How do I paint a shape?
#13
Here we go, this is probably what @PhilofPerth is looking for:
Code: (Select All)
Screen _NewImage(1200, 820, 32)
Dim colr As _Unsigned Long: colr = _RGB(255, 0, 0)
colr = _RGB(0, 255, 255)
PSet (500, 300): Draw "C" + Str$(colr) + "R100F100D100G100L100H100U100E100BM600,410P" + Str$(colr) + "," + Str$(colr)
'Paint (600, 410), colr ', colr

BM is Blind? Move, moving without drawing
Quote:"B" (blind) before a line move designates that the line move will be hidden. Use to offset from a "P" or PAINT border.
and for some reason P for Paint needs a border color along with Paint Color? It doesn't work with just the paint color.

Very finicky of Draw to be like that but it does seem to ignore spaces because we don't have to _Trim$(str$(colr))

So to sum up: After drawing the outline, Blind Move inside the object then P for paint the colr, borderColr


Fooling around:
Code: (Select All)
Dim colr As _Unsigned Long: colr = _RGB(255, 0, 0)
colr = _RGB(255, 0, 0)
PSet (500, 300): Draw "C" + Str$(colr) + "R100F100D100G100L100H100U100E100BM600,410P" + Str$(colr) + "," + Str$(colr)
'Paint (600, 410), colr ', colr
' R100  does top edge of octagonal so middle x = 500 + 50
midX = 500 + 50
' diagonal down 100 is 100 down (and 100 right) then right edge down 100 want half = 50
midY = 300 + 100 + 50

'check
PSet (midX, midY) ' yep! theres the middle
_Font _LoadFont("Arial.ttf", 100)
_PrintMode _KeepBackground
_PrintString (midX - _PrintWidth("STOP") / 2, midY - 43), "STOP" ' 50 too much 43 better
b = b + ...
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: 4 Guest(s)