fix alphatest (HACK!!!)
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 7 Dec 2005 14:15:25 +0000 (14:15 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 7 Dec 2005 14:15:25 +0000 (14:15 +0000)
lib/gdi/gpixmap.cpp

index 8fc263999b42df517a96fccd0157e8ee60d9e131..3e07bca05d2e36bca52705861fcfd981ac31c0f3 100644 (file)
@@ -180,7 +180,10 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag
        for (unsigned int i=0; i<clip.rects.size(); ++i)
        {
                eRect area=eRect(pos, src.size());
        for (unsigned int i=0; i<clip.rects.size(); ++i)
        {
                eRect area=eRect(pos, src.size());
-               area&=clip.rects[i];
+
+               if (!(flag & blitAlphaTest))  // HACK !!
+                       area&=clip.rects[i];
+
                area&=eRect(ePoint(0, 0), size());
                if ((area.width()<0) || (area.height()<0))
                        continue;
                area&=eRect(ePoint(0, 0), size());
                if ((area.width()<0) || (area.height()<0))
                        continue;
@@ -309,7 +312,7 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag
                                                // use duff's device here!
                                        while (width--)
                                        {
                                                // use duff's device here!
                                        while (width--)
                                        {
-                                               if (!*src)
+                                               if (*src==0x01)
                                                {
                                                        src++;
                                                        dst++;
                                                {
                                                        src++;
                                                        dst++;