Bitmap Drawing and Prototyping.

DwPrime is a bitmap drawing app: build pixel-perfect icons, sprites, tilesets for maps, and detailed pixel art using lines, rectangles/circles/ellipses (filled or outline), gradients, invert tools, eraser/transparency, and a circular palette with picker. Selection tools (copy, mirror, rotate, scale) speed tile and sprite assembly. Zoom/minimap and the transparency checkerboard aid precision, while 8-level undo/redo protects iterations and exports.


DwPrime 2.0 - Quick Tutorial (EN)
=================================

Goal
- Draw on HP Prime with shapes, colors, files, zoom, transparency, gradients, and invert tools.

Start and files
- On launch: reopens last file if save_config_files.txt exists.
- The app prevents auto-shutdown of the calculator (idle timeout raised to 2 h) and disables screen dimming; both are restored on exit (Esc).
- Autosave is enabled by default; it saves every N minutes (default 5, adjustable via the stopwatch icon in the Function menu): silent save if the file already has a name, otherwise it prompts to save.
- New/Load/Save/Save as icons; saving under a name that already exists asks to confirm overwrite first. Undo/Redo: 8-level history seeded at startup; Enter (tool/selection validate) adds a snapshot; history clears on Esc. For very large images the app may offer to disable undo/redo for performance.

Navigation and view
- Cursor: arrows/diagonals. Selection icon/key (Mark, x) arms the anchor and draws the selection rectangle; move the cursor then Enter to validate. Press again to deactivate the anchor.
- Zoom icon toggles zoom view; minimap key (LN); pan viewport with two fingers.
- Checkerboard icon toggles transparent background preview.

Drawing tools
- Point, Line, Polyline, Rect/Circle/Ellipse (outline or filled), Gradient rect H/V + pattern shade, Gradient circle, Gradient circle H/V, Gradient ellipse H/V, Paint fill zone, Text (with/without background), Eraser (transparent color), Brush stamping.
- Import: the import icon (File section) loads a picture as a movable overlay; move the cursor to position it, then Enter to place it into the drawing.
- Export: the export icon draws a rubber-band selection over any part of the drawing; press Enter to save just that region to its own file (prompts for a file name, then the destination app).
- Invert tools: line, rect/circle/ellipse outline, invert filled rect/circle/ellipse with placement cache.
- Line thickness: dialog sets stroke 1-4; returns to the drawing canvas after validation.
- Line style: separate dialog picks solid / dashed / dash-dot; applies to all outline strokes (lines, polylines, rect/circle/ellipse borders) independently of thickness.

Gradients (focal point positioning)
- Gradient tools (pattern rect, H rect, V rect, circle, circle H/V, ellipse H/V) work in two phases.
- Phase 1: place mark, move cursor to size the shape, then press Enter.
- Phase 2: cursor auto-moves to the center of the shape. Move cursor to set the gradient focal point, then press Enter to commit.
- Pattern rect: focal anywhere in the rectangle; radial gradient from corners (edgecolor) to cursor (bgcolor).
- H rect: cursor-Y sets the vertical peak; double gradient from top/bottom edges toward cursor.
- V rect: cursor-X sets the horizontal peak; double gradient from left/right edges toward cursor.
- Circle: cursor inside the disk sets the radial gradient center; the circle shape stays fixed.
- Circle H: cursor-X sets the horizontal focal point inside the circle; edgecolor at focal, bgcolor toward the edges. Special focal cursor shown.
- Circle V: cursor-Y sets the vertical focal point inside the circle; same behavior on vertical axis. Special focal cursor shown.
- Ellipse H: cursor-X sets the horizontal focal point inside the ellipse; symmetric gradient around the focal. Special focal cursor shown.
- Ellipse V: cursor-Y sets the vertical focal point inside the ellipse; symmetric gradient around the focal. Special focal cursor shown.

Brushes
- Brush icon (Function menu): paginated list of brushes stored in `brushes.txt` (AFiles). Select a brush to replace the point tool with that stamp, or choose "(none)" to revert to classic point/thickness.
- Default set auto-created if the file is missing: solid shapes (circle, square, hollow, ring, diamond, star, heart, diagonal) and alpha-gradient shapes (soft, feather, halo, cloud, ramp, spray, splatter), each in sizes 3 to 9 px; line/bar brushes (horizontal, vertical, bar) range from 3 to 10.
- Displayed names are localized to the calculator language.

Colors and transparency
- Circular palette for edge/bg; swap colors; color picker samples from canvas.
- Transparency panel sets alpha for edge/bg via slider drag or - / + buttons shown above each slider (pixel-by-pixel adjustment, 1 unit per 0.25 s); alpha shown on checkerboard.

Transforms (selection needed)
- Move or Copy/Stamp, Mirror H/V, Rotate (angle), Scale (%). Enter validates and resets caches; undo/redo works on validated steps.

Shortcuts (HP Prime bit codes)
- Enter; Selection (x); Zoom (+); Minimap (LN); Cursor move (6/4/2/8/7/1/3/9); Esc to exit and clear history.
