MaskPixmap doesn't work on 1.10

BlitzMax Forums/BlitzMax Programming/MaskPixmap doesn't work on 1.10

Mickey Crocker(Posted 2005) [#1]
I just purchased Blitzmax and I had written a bitmap font code to read and display my font from a png file on BliitzMax 1.09.

Everything worked great and the MaskPixmap masked the font perfectly... Then I updated to BlitzMax 1.10. I ran the code and it still worked fine. Then I went into my help file to look up some code in the Module Reference, there was no code there, it was all gone. I soon realized that I had to Synchronize Modules, which fixed my problem and I was able to see all the Module Reference code again.

This is where the problem began however. I then ran the code and for some reason the MaskPixmap does not work correctly anymore at all on my fonts. They are all bold, blocky and ugly. For some reason Synchronizing seemed to have messed up how MaskPixmap use to work.

I tried deleting everything and reinstalling version 1.09 but then BlitzMax wouldn't run my code at all without error, so I had to update to 1.10 again.

Does anyone know how to fix this?

Thanks


Dreamora(Posted 2005) [#2]
The best would check the change log because I think MaskPixmap was one of the commands that was buggy until 1.10 and did stuff not meant for it (ie working with commands that were meant for Images only)


tonyg(Posted 2005) [#3]
I still have them working at 1.10
Graphics 640,480,0
image:TImage=LoadImage("tmp.png")
mypixmap:TPixmap=LockImage(image)
mypixmap:TPixmap=MaskPixmap(mypixmap,255,0,255)
UnlockImage(image)
image1:TImage=LoadImage(mypixmap)
DrawRect 0,0,640,480
DrawImage image1,0,0
Flip
WaitKey()

Have you got any example code?


Mickey Crocker(Posted 2005) [#4]
It wouldn't do me any good to post code sample because is pretty well no different then yours, but I'm getting bad results.

I figured out a way around it though. I decided to not use the pixmap masking at all and just display each letter one at a time with drawpixmap, then I grab them all as images which are already set to mask. Then I remove the pixmaps from memory. Long way around it but it works :p