Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
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

Possibly Related Threads…
Thread Author Replies Views Last Post
  trouble filling in a closed vector shape madscijr 31 2,522 11-11-2025, 03:41 PM
Last Post: bplus
  Any way to paint an opening window bright white? Pete 2 810 11-29-2022, 02:06 AM
Last Post: bplus
  Image size, shape on Forum dcromley 7 1,658 05-05-2022, 12:22 AM
Last Post: dcromley

Forum Jump:


Users browsing this thread: 1 Guest(s)