Merge branch 'master' of git.opendreambox.org:/git/enigma2
authorFelix Domke <felix.domke@multimedia-labs.de>
Thu, 16 Jul 2009 21:41:52 +0000 (23:41 +0200)
committerFelix Domke <felix.domke@multimedia-labs.de>
Thu, 16 Jul 2009 21:41:52 +0000 (23:41 +0200)
lib/gui/elistboxcontent.cpp
lib/gui/elistboxcontent.h
lib/gui/esubtitle.cpp
lib/python/Components/MultiContent.py
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp

index e05da215913fc121cd4abc7d3dc3e4f39abfb600..4b4b58c1bc2c458d7e6d08dfd7ce06cf32b313ab 100644 (file)
@@ -945,6 +945,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
 
                                break;
                        }
+                       case TYPE_PIXMAP_ALPHABLEND:
                        case TYPE_PIXMAP_ALPHATEST:
                        case TYPE_PIXMAP: // pixmap
                        {
@@ -997,7 +998,7 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
                                        clearRegion(painter, style, local_style, ePyObject(), ePyObject(), pbackColor, pbackColorSelected, selected, rc, sel_clip, offset, cursorValid);
                                }
 
-                               painter.blit(pixmap, rect.topLeft(), rect, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : 0);
+                               painter.blit(pixmap, rect.topLeft(), rect, (type == TYPE_PIXMAP_ALPHATEST) ? gPainter::BT_ALPHATEST : (type == TYPE_PIXMAP_ALPHABLEND) ? gPainter::BT_ALPHABLEND : 0);
                                painter.clippop();
                                break;
                        }
index 6bb45590e433ab51c8a34136c8978f125dd44a03..d3d2a08937814e15ae343702d3528beb76b02a57 100644 (file)
@@ -69,7 +69,7 @@ class eListboxPythonMultiContent: public eListboxPythonStringContent
 public:
        eListboxPythonMultiContent();
        ~eListboxPythonMultiContent();
-       enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST };
+       enum { TYPE_TEXT, TYPE_PROGRESS, TYPE_PIXMAP, TYPE_PIXMAP_ALPHATEST, TYPE_PIXMAP_ALPHABLEND };
        void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected);
        int currentCursorSelectable();
        void setList(SWIG_PYOBJECT(ePyObject) list);
index f3d0e35f1edcb5afc655aef11deb060b8e67e180..5cf4cfa2b6d9c403712845ea83a22cb471bccddb 100644 (file)
@@ -115,8 +115,12 @@ void eSubtitleWidget::clearPage()
 void eSubtitleWidget::setPixmap(ePtr<gPixmap> &pixmap, gRegion changed, eRect pixmap_dest)
 {
        m_pixmap = pixmap;
-       m_pixmap_dest = pixmap_dest;
+       m_pixmap_dest = pixmap_dest; /* this is in a virtual 720x576 cage */
        
+               /* incoming "changed" regions are relative to the physical pixmap area, so they have to be scaled to the virtual pixmap area, then to the screen */
+       changed.scale(m_pixmap_dest.width(), 720, m_pixmap_dest.height(), 576);
+       changed.moveBy(ePoint(m_pixmap_dest.x(), m_pixmap_dest.y()));
+
        changed.scale(size().width(), pixmap->size().width(), size().height(), pixmap->size().height());
        
        invalidate(changed);
index 6afd0941c081fe5878482d8d2fc922ee08be9a9d..1e6f3e0229a068b56a2841c35994a0d6380bf251 100644 (file)
@@ -11,6 +11,9 @@ def MultiContentEntryPixmap(pos = (0, 0), size = (0, 0), png = None, backcolor =
 def MultiContentEntryPixmapAlphaTest(pos = (0, 0), size = (0, 0), png = None, backcolor = None, backcolor_sel = None):
        return (eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pos[0], pos[1], size[0], size[1], png, backcolor, backcolor_sel)
 
+def MultiContentEntryPixmapAlphaBlend(pos = (0, 0), size = (0, 0), png = None, backcolor = None, backcolor_sel = None):
+       return (eListboxPythonMultiContent.TYPE_PIXMAP_ALPHABLEND, pos[0], pos[1], size[0], size[1], png, backcolor, backcolor_sel)
+
 def MultiContentEntryProgress(pos = (0, 0), size = (0, 0), percent = None, borderWidth = None, foreColor = None, backColor = None, backColorSelected = None):
        return (eListboxPythonMultiContent.TYPE_PROGRESS, pos[0], pos[1], size[0], size[1], percent, borderWidth, foreColor, backColor, backColorSelected)
 
index 074b31850ad723727c8af59e0d9bbcc0ab5a8b96..917d4cc50641bf83362ed941dc0cc805fa5105ab 100644 (file)
@@ -188,6 +188,7 @@ void eServiceDVD::gotMessage(int /*what*/)
 #ifdef DDVD_SUPPORTS_GET_BLIT_DESTINATION
                                ddvd_get_blit_destination(m_ddvdconfig, &x_offset, &y_offset, &width, &height);
                                eDebug("values got from ddvd: %d %d %d %d", x_offset, y_offset, width, height);
+                               y_offset = -y_offset;
                                width -= x_offset * 2;
                                height -= y_offset * 2;
 #endif