color help

BlitzMax Forums/BlitzMax Beginners Area/color help

mudcat(Posted 2005) [#1]
I draw my image with this

Method draw()
	SetRotation(direction)
	DrawImage (image,x,y)
	SetRotation(0)
End Method


then I draw some ovals,red with black ovals inside.


Method draw()
		SetColor 255,0,0
		DrawOval x,y,size,size
		SetColor 0,0,0
		DrawOval x+1,y+1,size-2,size-2
                setcolor 255,255,255
End Method


My image goes under the black oval and disappears.
Why isn't the black oval transperent?
Thanks,
mudcat


Perturbatio(Posted 2005) [#2]
why would a black oval be transparent?


mudcat(Posted 2005) [#3]
I thought black was the transparent color?It is on my image.

later


Perturbatio(Posted 2005) [#4]
perhaps it would be better if you were to explain what it is you are trying to do.


mudcat(Posted 2005) [#5]
I wanted to draw a yellow circle with black holes to represent cheese,
then have a mouse run under the cheese but be able to see the mouse
through the holes.I was hoping to draw the swiss looking cheese on the fly so I could randomize the look of the cheese.

The code I posted was just a test to see if I could do it with ovals.

Thanks,
mudcat


tonyg(Posted 2005) [#6]
An image keeps a track of what it's masked colours are
and, rather than drawing black (in this case), it doesn't draw the pixel.
The drawoval command just draws black pixels
To do the hollow oval you'd have to grab the 2 ovals into a pixmap then mask it, then either drawpixmap it or convert to an image and drawimage.
I think...


mudcat(Posted 2005) [#7]
tonyg,
I see what u mean,use the grabimage or similar,I'll have to look into that.
Thanks for the reply,
mudcat