How do I paint a shape?
#21
Hi
taking the code from #10 Bplus post
I translate all the graphic commands into DRAW instructions. Then I modify this for showing how S make easy to do so much copy at different width 
Code: (Select All)
Screen _NewImage(1200, 820, 32)
Dim colr As _Unsigned Long
colr = _RGB32(0, 255, 255)
Draw "s4" ' default setting of Draw
Draw "C" + Str$(colr) + "bm300,200" + "R100F100D100G100L100H100U100E100" + "bm +10,+10 p" + Str$(_RGBA32(0, 0, 255, 255)) + "," + Str$(colr)
_Delay 1
Draw "S2C" + Str$(colr) + "bm200,100" + "R100F100D100G100L100H100U100E100" + "bm +10,+10 p" + Str$(_RGBA32(0, 0, 255, 255)) + "," + Str$(colr)
_Delay 1
Draw "s1C" + Str$(colr) + "bm50,30" + "R100F100D100G100L100H100U100E100" + "bm +10,+10 p" + Str$(_RGBA32(0, 0, 255, 255)) + "," + Str$(colr)
_Delay 1
Draw "s6C" + Str$(colr) + "bm600,300" + "R100F100D100G100L100H100U100E100" + "bm +10,+10 p" + Str$(_RGBA32(0, 0, 255, 255)) + "," + Str$(colr)
As we can observe we need not PSET or similar graphic command to move the graphic cursor on the screen,
moreover done the closed shape we must move into it and it is easy using Blind Move with relative cohordinates (like STEP option of the other graphic instructions)
at the end we can fill with a color until the edge of a specific color the shape using Pcolortodraw, colorof edge
and at last changing S setting we change the dimension of the shape to draw
Happy coding with Draw!
Reply


Messages In This Thread
How do I paint a shape? - by PhilOfPerth - 06-27-2023, 08:00 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-27-2023, 10:54 AM
RE: How do I paint a shape? - by OldMoses - 06-27-2023, 11:22 AM
RE: How do I paint a shape? - by TerryRitchie - 06-27-2023, 11:56 AM
RE: How do I paint a shape? - by bplus - 06-27-2023, 12:26 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:05 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:19 PM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:20 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 07:13 PM
RE: How do I paint a shape? - by Petr - 06-27-2023, 02:39 PM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 12:19 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:36 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 01:29 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 02:08 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:04 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 02:16 AM
RE: How do I paint a shape? - by mnrvovrfc - 06-28-2023, 02:50 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 03:03 AM
RE: How do I paint a shape? - by bplus - 06-28-2023, 02:30 AM
RE: How do I paint a shape? - by PhilOfPerth - 06-28-2023, 05:03 AM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 09:24 PM
RE: How do I paint a shape? - by TempodiBasic - 06-28-2023, 10:09 PM



Users browsing this thread: 2 Guest(s)