Hi,
Sorry for my quite bad English, but I am French... :wink:
I would like to add a color method in the Bitmap class, like the Sprite's.
(Naturally, I can't and I don't want to use the color management of the Sprite class)
eg:
bmp.color=Color.new(152,25,125,55)
but the transparent color management in the background is deleted.
Should I use a recolor pixel by pixel?
Has someone an answer to my question ?
thanks, :thumb:
berka
Sorry for my quite bad English, but I am French... :wink:
I would like to add a color method in the Bitmap class, like the Sprite's.
(Naturally, I can't and I don't want to use the color management of the Sprite class)
eg:
bmp.color=Color.new(152,25,125,55)
Code:
class Bitmap
def color=(col)
bmp=Bitmap.new(self.width,self.height)
bmp.fill_rect(0,0,self.width,self.height,col)
self.stretch_blt(Rect.new(0,0,self.width,self.height), bmp, bmp.rect)
bmp.dispose
end
end
but the transparent color management in the background is deleted.
Should I use a recolor pixel by pixel?
Has someone an answer to my question ?
thanks, :thumb:
berka