From f5add49708690739a30f96ab7fad1129266292d0 Mon Sep 17 00:00:00 2001 From: visionmercer <62051836+visionmercer@users.noreply.github.com> Date: Wed, 20 May 2026 09:27:54 +0200 Subject: [PATCH] better icons, not good icons, but better. --- pixler.bas | 83 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 69 insertions(+), 14 deletions(-) diff --git a/pixler.bas b/pixler.bas index 22479e1..5d5928f 100644 --- a/pixler.bas +++ b/pixler.bas @@ -735,34 +735,89 @@ function icon (index as long) static icons() as long if not init then redim icons(19) as long ' Room for 20 icons + dim c as _unsigned long: c = _rgb32(255, 255, 255) ' Main icon color - ' Define your specific tool icons here - icons(0) = _newimage(32,32,32): _dest icons(0): line (5, 27)-(27, 5): _dest 0 - icons(1) = _newimage(32,32,32): _dest icons(1): circle (15, 15), 13: _dest 0 - icons(2) = _newimage(32,32,32): _dest icons(2): line (5, 5)-(27, 27), , b: _dest 0 - icons(6) = _newimage(32,32,32): _dest icons(6) - line (5,15)-(15,5):line -(25,15):line -(20,25): line -(10,25):line -(5,15) + ' --- 1. Pencil Tool --- + icons(0) = _newimage(32, 32, 32): _dest icons(0) + line (6, 26)-(22, 10), c + line (22, 10)-(26, 6), c + line (26, 6)-(26, 10), c + line (26, 10)-(10, 26), c + line (10, 26)-(6, 26), c + pset (7, 25), c ' Tip point _dest 0 + ' --- 2. Line Tool --- + icons(1) = _newimage(32, 32, 32): _dest icons(1) + line (5, 27)-(27, 5), c + _dest 0 + + ' --- 3. Hollow Circle --- + icons(2) = _newimage(32, 32, 32): _dest icons(2) + circle (16, 16), 11, c + _dest 0 + + ' --- 4. Filled Circle --- + icons(3) = _newimage(32, 32, 32): _dest icons(3) + dim r as integer + for r = 0 to 11: circle (16, 16), r, c: next r + _dest 0 + + ' --- 5. Hollow Box --- + icons(4) = _newimage(32, 32, 32): _dest icons(4) + line (6, 6)-(26, 26), c, b + _dest 0 + + ' --- 6. Filled Box --- + icons(5) = _newimage(32, 32, 32): _dest icons(5) + line (6, 6)-(26, 26), c, bf + _dest 0 + + ' --- 7. Hollow Polygon (Triangle Blueprint) --- + icons(6) = _newimage(32, 32, 32): _dest icons(6) + line (16, 5)-(6, 25), c + line (6, 25)-(26, 25), c + line (26, 25)-(16, 5), c + _dest 0 + + ' --- 8. Filled Polygon --- icons(7) = _newimage(32, 32, 32): _dest icons(7) - ' Draw a small filled shape for the filled polygon icon - for fy = 10 to 20: line (10, fy)-(22, fy): next + dim py as integer + for py = 5 to 25 + dim hw as integer: hw = (py - 5) * 10 / 20 + line (16 - hw, py)-(16 + hw, py), c + next py _dest 0 + + ' --- 9. Floodfill (Paint Bucket) --- icons(8) = _newimage(32, 32, 32): _dest icons(8) - ' Simple "Bucket" icon - line (8, 10)-(24, 10): line -(26, 22): line -(6, 22): line -(8, 10) - line (10, 8)-(22, 8) ' Handle + line (8, 14)-(20, 26), c ' Main body tilt left + line (20, 26)-(26, 20), c + line (26, 20)-(14, 8), c + line (14, 8)-(8, 14), c + ' Fixed syntax: Using valid multiplier expressions for the arc + circle (14, 11), 6, c, _pi(1), _pi(1.5) + pset (6, 28), c ' Spilling drip point _dest 0 - ' Fill the remaining slots with blank 32x32 images + + ' --- 10. Eyedropper --- + icons(9) = _newimage(32, 32, 32): _dest icons(9) + line (6, 26)-(10, 22), c ' Pipette tip + line (10, 22)-(22, 10), c ' Shaft side A + line (6, 26)-(18, 14), c ' Bottom point accent + line (14, 18)-(26, 6), c ' Shaft side B + line (22, 10)-(26, 6), c ' Squeeze bulb cap + _dest 0 + + ' Fill remaining fallback slots (10-19) with clean blank images dim j as integer - for j = 0 to 19 + for j = 10 to 19 if icons(j) = 0 then icons(j) = _newimage(32, 32, 32) next init = -1 end if - ' Bounds checking to prevent returning 0 or crashing if index >= 0 and index <= 19 then icon = icons(index) else