![]() |
Filling drawings - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16) +---- Thread: Filling drawings (/showthread.php?tid=2607) |
Filling drawings - baltasarq - 02-07-2025 There's no function or command "fill", allowing to pass two coordinates and making the computer to fill all delimited pixels with the current color. Code: circle 50, 50, 30 In the eighties, I used to fill a circle with a for loop: Code: circle 50, 50, 30 Thanks, RE: Filling drawings - boriel - 02-08-2025 There is a Fill library. Which actually fills a Drawing using a UDG pattern (not only solid). See an example here: https://github.com/boriel-basic/zxbasic/blob/main/examples/spfill.bas To use UDG you have either to compile with --sinclair or do POKE UInteger 23672, <address of UDG> There is a thread about this routine here: https://www.boriel.com/forum/showthread.php?tid=439 RE: Filling drawings - baltasarq - 02-08-2025 > boriel' Wrote:> There is a Fill library. Which actually fills a Drawing using a UDG pattern (not only solid). RE: Filling drawings - boriel - 02-09-2025 Yes, define it with 255 (all eight bytes). Since this CHAR already exist in the ROM, you can use a simple POKE to use that char. |