X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Fepixmap.cpp;h=f20c1a9fcd6ad9541f9a2952180a4cc295ab7070;hb=6f71e3512f6112d2523901860c603c03fd6e6ccd;hp=84fec3232335a09e7d87f8864257cd9bbc53c434;hpb=1c242c0a654a5c4048ba4219a0982f8ba8a85246;p=vuplus_dvbapp diff --git a/lib/gui/epixmap.cpp b/lib/gui/epixmap.cpp index 84fec32..f20c1a9 100644 --- a/lib/gui/epixmap.cpp +++ b/lib/gui/epixmap.cpp @@ -3,7 +3,7 @@ #include ePixmap::ePixmap(eWidget *parent) - :eWidget(parent), m_alphatest(false) + :eWidget(parent), m_alphatest(false), m_scale(false) { } @@ -13,6 +13,15 @@ void ePixmap::setAlphatest(int alphatest) setTransparent(alphatest); } +void ePixmap::setScale(int scale) +{ + if (m_scale != scale) + { + m_scale = scale; + invalidate(); + } +} + void ePixmap::setPixmap(gPixmap *pixmap) { m_pixmap = pixmap; @@ -76,7 +85,10 @@ int ePixmap::event(int event, void *data, void *data2) flags = gPainter::BT_ALPHATEST; else if (m_alphatest == 2) flags = gPainter::BT_ALPHABLEND; - painter.blit(m_pixmap, ePoint(0, 0), eRect(), flags); + if (m_scale) + painter.blitScale(m_pixmap, eRect(ePoint(0, 0), size()), eRect(), flags); + else + painter.blit(m_pixmap, ePoint(0, 0), eRect(), flags); } return 0;