TYPE_PIXMAP_ALPHATEST in eListboxMultiContent, fix alphatest
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 26 Jan 2006 02:00:38 +0000 (02:00 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 26 Jan 2006 02:00:38 +0000 (02:00 +0000)
lib/gdi/gpixmap.cpp
lib/gui/elistboxcontent.cpp
lib/gui/elistboxcontent.h
lib/python/Components/TimerList.py

index e44ee0f..3ebd9a0 100644 (file)
@@ -310,7 +310,7 @@ void gPixmap::blit(const gPixmap &src, ePoint pos, const gRegion &clip, int flag
                                                // use duff's device here!
                                        while (width--)
                                        {
-                                               if (*src==0x01)
+                                               if (!(pal[*src]&0x80000000))
                                                {
                                                        src++;
                                                        dst++;
index c874cd3..ff93eac 100644 (file)
@@ -517,7 +517,7 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style,
                                                        int num = PyInt_Check(entry) ? PyInt_AsLong(entry) : -1;
                                                        
                                                        if ((num < 0) || (num >= glyphs))
-                                                               eWarning("glyph index %d in PythonConfigList out of bounds!");
+                                                               eWarning("glyph index %d in PythonConfigList out of bounds!", num);
                                                        else
                                                        {
                                                                para->setGlyphFlag(num, GS_INVERT);
@@ -713,6 +713,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
 
                                break;
                        }
+                       case TYPE_PIXMAP_ALPHATEST:
                        case TYPE_PIXMAP: // pixmap
                        {
                                if (!(px && py && pwidth && pheight && pfnt))
@@ -736,7 +737,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
                                r &= itemrect;
                                
                                painter.clip(r);
-                               painter.blit(pixmap, r.topLeft(), r);
+                               painter.blit(pixmap, r.topLeft(), r, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : 0);
                                painter.clippop();
 
                                break;
index a93ba51..d364837 100644 (file)
@@ -126,7 +126,7 @@ private:
 class eListboxPythonMultiContent: public eListboxPythonStringContent
 {
 public:
-       enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP };
+       enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST };
        void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
        
        void setFont(int fnt, gFont *fnt);
index 6349466..f55c9b1 100644 (file)
@@ -62,7 +62,7 @@ def TimerEntryComponent(timer, processed):
 
        if timer.disabled:
                png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/redx.png"))
-               res.append((eListboxPythonMultiContent.TYPE_PIXMAP, 490, 5, 40, 40, png))
+               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 490, 5, 40, 40, png))
        
        return res