|
Post by dazzab73 on Aug 24, 2007 1:09:51 GMT -5
Not sure if this is a bug or some misunderstanding on my behalf. If this isn't a bug, please feel free to move this topic to another forum. Basically, I think there may be a problem with the graphics.CopyRegion method and the transparent colour value. I have a bitmap font image (which is in.png format). I am rendering to a new image. If I use the graphics.SetImage and graphics.SetXY methods, the bitmap font displays fine. If I try to display the same image using the graphics.CopyRegion method, it seems to "loose" the black background transparent colour value i.e. the black area around the specified region is displayed. Attached is an image and example code demonstrating this issue. Cheers. Daz.
|
|
|
Post by matthew on Aug 24, 2007 3:36:41 GMT -5
Lol, I've never used the .png Format for Graphics in Brutus2D. I don't think I've ever used 'Graphics.CopyRegion' either. When Guilect visits the Forum he'll probably be able to answer your question.
|
|
|
Post by dazzab73 on Aug 24, 2007 4:46:49 GMT -5
I switched to using .png format a few years ago. It offers smaller file size compared to .bmp format. I also seem to remember there was also a reason for using .png over .jpg when using game sprites but, for the life of me, I cannot remember why!! ;D I am at work at the moment so don't have access to Brutus2d. When I get home I will try converting the .png to both .bmp and .jpg and see if that makes any difference. Yep, hopefully Guilect has an explanation.
|
|
|
Post by matthew on Aug 24, 2007 4:55:38 GMT -5
When I'm using one of my other Programming Languages, I always use the .png Format.
But strangely when I use Brutus2D I always go back to using the .bmp Format. ;D
|
|
|
Post by Guilect on Aug 24, 2007 17:25:54 GMT -5
Explanation: CopyRegion works with CreateImage. CreateImage creates a bitmap (if you will) but with no transparency. So any CopyRegion image will look just like the source image area that you copied.
I have tried in the past to have the CopyRegion work with the backbuffer instead of CreatedImages, but it did not produce the desired results. I tried again for a little tonight but no prgress to report. I will keep at it. Just be aware of how it currently works.
|
|
|
Post by u9 on Aug 25, 2007 8:12:52 GMT -5
Hey dazzab73. Do you know where i can find such font images?
Btw, Welcome ;D
|
|
|
Post by matthew on Aug 25, 2007 11:13:31 GMT -5
Hey U9, if you're after some colourful Fonts you should check out Flashtro. They've got a lot of Fonts ripped from various Amiga Demos.
|
|
|
Post by dazzab73 on Aug 25, 2007 12:13:59 GMT -5
Hi u9, I'd like to say that I draw all my own bitmap fonts but I am very very very very very very very artistically challenged!!! ;D I cannot draw to save my life. So, I have to rely on the following website to get all my bitmap fonts: cgi.algonet.se/htbin/cgiwrap?user=guld1&script=fonts.pl
|
|