InkForge app icon InkForge/ Case study · Swift + Electron · 2026

A professional drawing app, engineered from the brush engine up.

InkForge is a GPU-backed raster drawing app: a stamp-based brush engine with six procedural tips, a layer compositor with twelve blend modes, four selection modes, a frame-animation timeline with GIF89a and WebM encoders written from scratch, and a fourteen-mode AI panel driving a local ComfyUI graph or Gemini/Replicate. Written twice: native macOS in Swift/AppKit/CoreGraphics, then again on an HTML5-canvas engine for Windows and Linux.

13tools
12blend modes
6texture tips
4selection modes
14AI modes
2render engines
FIG. 01 · The native macOS build. A GPU-backed raster canvas rotated -13°, an AI style-transfer layer sitting above a pencil sketch, the layers panel with αLock·Clip·Ref·Mask·FX, and the HSB color wheel.
01THE INSTRUMENT

Latency is the feature

A drawing app is judged in the milliseconds between pen and pixel. Every stroke in InkForge renders as evenly spaced stamps along the path, with smoothing and interpolation between samples, and pressure mapped to size and opacity at once. Canvas rotation and zoom are true matrix transforms - not view tricks - so brush texture stays faithful at any angle.

Pressure comes from anywhere: a dedicated Wacom driver on the native build, and Pointer Events on the web build - so the same brush dynamics work on a tablet, a pen display or a trackpad.

Written twice, on purpose

The first build is native macOS: Swift, AppKit and CoreGraphics, GPU-backed bitmaps, zero Electron. But a native macOS app never reaches Windows - so the drawing engine was rebuilt, system by system, on an HTML5 canvas: the same 13 tools, the same blend modes, the same .inkforge format.

Two full codebases of the same product are also a design test: any feature that ports between AppKit and web canvas is a feature defined by its behavior, not by its framework. Windows installers build themselves on GitHub Actions on every v* tag.

02THE INTERFACE

Built for the hand holding a pen

A dense dark surface: one tool bar up top, vertical size and opacity sliders on the free-hand side, three panels on the right. No floating window ever covers the drawing.

InkForge tool bar: pen, pencil, marker, spray, soft round, smudge, eraser, fill, eyedropper, text, selection, transform, pan, zoom, layers and color
FIG. 02 · The tool bar. Pen · pencil · marker · spray · soft round · smudge · eraser · fill · eyedropper · text · selection · transform · pan · zoom · layers · color. Every tool has a key - full index in section 03.
Rotate, Zoom and Size control dials

Control dials

Rotate / Zoom / Size. Drag to adjust, double-click to reset. Rotation is a true canvas transform and zoom anchors to the cursor - the drawing hand never leaves the pen.

Layers panel with blend mode, opacity, alpha lock, clip, reference, mask and FX

Layers

Per-layer blend mode and opacity, plus αLock · Clip · Ref · Mask · FX: transparency lock, clip-to-base-alpha, a reference layer for fill boundaries, masks and effects - all non-destructive.

HSB color wheel with hue ring and saturation-brightness square

Color

An HSB wheel - hue ring around a saturation/brightness square - with sliders, hex input, color history and harmony sets: complementary, analogous, triad and split.

03TOOL INDEX

Every tool, one key

Full keyboard coverage. Left hand on keys, right hand on the pen - the menus exist, but they are never required.

Tools
BPen - the primary pressure brush
S E GSmudge · Eraser · Fill - smear, pressure erase, flood fill with tolerance
I TEyedropper · Text - color pick, multi-line type
MSelection - rect · ellipse · lasso · wand; Shift adds, Option subtracts
VTransform - move and scale, Shift locks aspect
H Z SpacePan · Zoom - navigation; hold Space to pan
F J RTexture tips - Dry Brush · Ink · Charcoal, of six procedural tips
[ ]Brush size - down / up mid-stroke
Commands
⌘NNew canvas - size, DPI and presets
⌘Z ⌘⇧ZUndo / redo - snapshot history
⌘A ⌘DSelect all / deselect
⌘⇧IInvert selection
⌘⇧AOpen the AI panel (section 05)
⌘EExport - PNG / JPEG / TIFF
04THE ENGINE

Seven systems under the pen

4.1Brush engineEvenly spaced stamps along the stroke with smoothing and interpolation. Six procedural texture tips (Round, Dry Brush, Ink, Charcoal, Stipple, Noise) with size/opacity/angle jitter and three tip-rotation modes: fixed, random, stroke-direction.
4.2CompositingUnlimited layers, twelve blend modes (Multiply through Exclusion), alpha lock, clipping masks, and a reference layer the fill tool respects as a boundary.
4.3SelectionRectangle, ellipse, lasso and magic wand with marching ants. The selection clips everything: brushes, shapes, filters and AI edits.
4.4QuickShapeShape detection at stroke end: a short hold snaps the freehand line to a clean line, ellipse or rectangle; Shift constrains to 45°. Technical drawing without a ruler.
4.5Filters & layer FXCIFilter wrappers - grayscale, blur, sharpen, hue, saturation, contrast - and non-destructive layer effects: drop shadow, outer glow and stroke.
4.6AnimationA frame-by-frame timeline with duplication, onion-skinning and adjustable FPS. Export runs through a GIF89a encoder written from scratch (median-cut quantization) or WebM - no external dependency.
4.7FilesNative .inkforge projects preserve every layer and frame; PNG/JPEG/TIFF export; built-in time-lapse recording of the whole session.
4.8HistorySnapshot-based undo/redo that covers layer operations, selection and transforms - not only brush strokes.
05THE AI PANEL

Fourteen modes, zero round-trips

The AI is a tool inside the drawing, not a website beside it. Every result lands as a new layer above the original - maskable, erasable, paintable.

1DrawA line sketch, a color block, or an empty canvas - any starting point works.
2⌘⇧AThe AI panel opens over the canvas: mode, provider, prompt.
3Pick an engineGemini or Replicate with your own key. Gemini has a free tier, so you can try every mode without paying for anything. Or point it at a local ComfyUI on your own GPU, no key and no cloud.
4New layerThe result lands above the original. The sketch stays one layer below.
A rough black line sketch of mountains, a sun and birds drawn in InkForge
Input · the line layer, as drawn
A photorealistic snow-capped mountain range at golden sunrise with birds, generated on a new layer by InkForge AI
Output · Sketch to Painting, new layer

FIG. 03 · Same canvas, two layers

The sketch on the left was drawn with the pen tool; "Sketch to Painting" sent it as img2img input with a short prompt, a Strength slider deciding how much composition survives. The snow-capped peaks came back as a new layer above the line layer - which stays intact below.

MODES · Generate · Reference Pose · Style Transfer · Sketch to Painting · Auto-Color · Line Art Extract · Upscale · Background Remove · Inpaint · Texture Fill · Outpaint · Describe · Variations · Object Select
06ARCHITECTURE

One app, two render engines

InkForge same tools · same .inkforge format Native · macOS Swift · AppKit · CoreGraphics GPU bitmap · Wacom driver .dmg Cross-platform Electron · HTML5 Canvas 2D Pointer-event pressure · local ComfyUI Windows .exe · Mac · Linux
The format is the contract. An .inkforge file - layers, frames, metadata - opens identically in both engines. That is what makes two codebases one app.
A GIF encoder from scratch. GIF89a with median-cut palette quantization, alongside WebM export. The timeline ships real files with no ffmpeg and no third-party libraries.
AI routes through the main process. Every call goes through the app's main process - zero CORS issues. Keys are stored locally and never bundled; the ComfyUI path never leaves the machine.
CI is the Windows machine. The .exe builds on a GitHub Actions runner on every v* tag and attaches to the Release - no Windows box on the desk.
STACK · Swift · AppKit · CoreGraphics · CIFilter · Wacom · Electron · HTML5 Canvas 2D · GIF89a encoder · ComfyUI · Gemini / Replicate · GitHub Actions CI
Two full implementations of the same tool, by one person - because the best way to understand a tool is to build every layer of it.
DOWNLOAD

Open source, free (MIT)

An installer per platform, and the full source on GitHub. The cross-platform build is where active development continues; the native macOS build is the original Swift implementation.

Cross-platform build v1.4.0 · native macOS build v1.0 · Windows 10+ · macOS 13+ · MIT license