Skip to content

Pixel-perfect mode

A toggle that automatically removes "L-shaped" corners from free-hand pencil/eraser strokes. The result is the cleaner pixel-art line you'd draw if you were placing each pixel by hand: smooth diagonals, no zigzag.

Only applies to brush size 1. For larger brushes, the L-shape concept doesn't make sense.


Where to find it

Tools panel → Brush section → checkbox Pixel-perfect. Only enabled when Size = 1.

Pixel-perfect checkbox


What's an L-shape?

If three consecutive pixels of a stroke form a corner — P_{n-1} and P_{n+1} are 4-connected to P_n and diagonally adjacent to each other — then P_n is the L pixel. Removing it leaves a clean diagonal step.

Example (o = stroke pixel, . = empty, the * is the L pixel):

Before:        After:
o . . .        o . . .
o * . .        . . . .
. o . .        . o . .
. o . .        . o . .

The * was a redundant corner. Without pixel-perfect mode, every direction change leaves these. With it, they're retracted in real time as the cursor moves.


How it works

While drawing, the editor tracks a trail of the pixels you've placed. Each new pixel checks the previous two for an L-shape. If it forms one, the middle pixel is retracted (restored to its pre-stroke colour) before the new pixel is placed.

Retraction restores the original colour under the L — not just transparency. So if you were drawing over an existing pattern, you don't accidentally erase the underlying art.


When to use it

  • ✅ Drawing clean curves and diagonals at brush size 1
  • ✅ Anti-aliasing-free linework where you want consistent 1-pixel-wide strokes
  • ❌ When you actually want zigzag corners as part of the look (rare in pixel art)
  • ❌ At brush size > 1 (no effect, the checkbox is disabled)

For a workflow that combines pixel-perfect with Symmetry, each branch has its own L-trail, so cleanup works correctly on both sides.


Caveats

  • The L-filter is stroke-local. It looks at the current trail only. Once you release the mouse, the stroke is committed and any subsequent strokes start a new trail.
  • You can't pixel-perfect-clean a stroke after the fact. Either undo and redraw with the toggle on, or manually clean up.
  • For very fast cursor movements, Bresenham line interpolation fills in pixels — those are checked for L-shapes too, so the result is consistent regardless of cursor speed.

Tips

  • Even if you're a confident hand-drawer, leave pixel-perfect on for outlines. It saves time.
  • Turn it off when sketching rough shapes — sometimes the auto-cleanup is over-eager and removes pixels you wanted.
  • Pair with Symmetry for symmetric clean lineart in half the strokes.

Motestack is a personal hobby project. The editor and these docs ship under no warranty — back up your `.mstack` files.