![]() |
|
Filling drawings - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://forum.boriel.com/forumdisplay.php?fid=16) +---- Thread: Filling drawings (/showthread.php?tid=2607) |
Filling drawings - baltasarq - 2025-02-07 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, 30In the eighties, I used to fill a circle with a for loop: Code: circle 50, 50, 30Thanks, RE: Filling drawings - boriel - 2025-02-08 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://forum.boriel.com/showthread.php?tid=439 RE: Filling drawings - baltasarq - 2025-02-08 > boriel' Wrote:> There is a Fill library. Which actually fills a Drawing using a UDG pattern (not only solid). RE: Filling drawings - boriel - 2025-02-09 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. |