Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I paint a shape?
#18
(06-27-2023, 02:19 PM)Petr Wrote: @PhilofPerth

Do you need the exact same shape in red?

In this way you can save to memory more images - and then place it using _PutImage - it is fastest method.

Code: (Select All)

'how create more images from one in different colors

Dim Images(3) As Long

Screen _NewImage(1200, 820, 32)
Dim colr As _Unsigned Long: colr = _RGB(255, 0, 0)

For ImageCreate = 0 To 3
    Select Case ImageCreate
        Case 0: R = 0: G = 255: B = 255
        Case 1: R = 255: G = 255: B = 255
        Case 2: R = 255: G = 255: B = 0
        Case 3: R = 0: G = 0: B = 255
    End Select

    Images(ImageCreate) = _NewImage(1200, 820, 32)
    _Dest Images(ImageCreate)
    colr = _RGB(R, G, B)
    PSet (500, 300): Draw "C" + Str$(colr) + "R100F100D100G100L100H100U100E100"
Next
_Dest 0
For ImageView = 0 To 3
    Cls
    _PutImage , Images(ImageView), 0
    Print "Press any key for next image..."
    Sleep
Next

Thanks Petr. No, I didn't necessarily want the exact same shape. I wanted a flexible algorithm that I could apply to different shapes to colour them
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
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: 5 Guest(s)