Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Erasing (or making a section of an image transparent) based on a mask from image #2?
#10
Your Steve1 routine seems a little complex to one Steve.  Big Grin

Try this:

Code: (Select All)
$Color:32
Screen _NewImage(640, 480, 32)
image = _NewImage(320, 240, 32) 'this would be the image I was going to load
_Dest image
Circle (100, 100), 75, Red: Paint (100, 100), Red 'just to create a circle on my image
Circle (150, 150), 75, Blue: Paint (150, 150), Blue 'an overlapping circle
_Dest 0 'set dest back to main screen
Cls , Gold
Sleep 'so we can see the pure gold screen
Mask 100, 100, image 'this used that image as a mask to blank the screen
Sleep
System

Sub Mask (xPos, yPos, image)
    b = _Blend: s = _Source: _Source image
    _DontBlend
    For x = 0 To _Width(image) - 1: For y = 0 To _Height(image) - 1
            If Point(x, y) Then PSet (x + xPos, y + yPos), 0
    Next y, x
    If b Then _Blend
    _Source s
End Sub
Reply


Messages In This Thread
RE: Erasing (or making a section of an image transparent) based on a mask from image #2? - by SMcNeill - 04-13-2025, 09:11 PM



Users browsing this thread: 1 Guest(s)