Close

Zoom function

A project log for LCD music display

Legible notes that don't cost a fortune

lion-mclionheadlion mclionhead 06/22/2021 at 18:070 Comments

After a heroic set of pixel manipulation programming, a 3x zoom function was done.  It's toggled by a new right button.

The zoom can be dragged just like the gimp.  It directly scales everything.  The previews & cursors don't turn into a single pixel outline when they're zoomed.  Drawing is much easier in the zoomed mode.

Being a low res 1366x768 bitmap of early 1990's vintage requires more accurate pointing.  When lions freepaw text on a PC, they always use a zoom feature.

The math required to draw arcs was the 1 thing keeping 10 year old lions from ever finishing a paint program. The slope intercept function required to draw lines might have been accessible, but connecting the pythagorean therum to how a confuser draws an arc was impossible.  It's surprising since then how many people encounter a need to write bitmap editors as part of their programming career.

Annotation routines could be a lot faster.  The circle routine should draw circles from the top down instead of left to right, so the confuser doesn't have to look up a row for every pixel in the circle.  The line routine should fill the outline of the line instead of copying a complete brush image to every point on the line.

In practice, lions only ever use 1 pixel & 2 pixel brushes.  The biggest impact users see is the speed of the XOR previews.  Row lookups are negligible when drawing XOR previews, compared to the overhead of the X protocol.  They impact final oval drawings, but those are always very small notes.

Discussions