diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-06-03 14:56:04 +0200 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-06-03 14:59:34 +0200 |
| commit | 34d336d2c8e99b15045cd1ef7d40cbee4c0f18bb (patch) | |
| tree | c0c29806ef949e9395bc5ebcfbe4ecea887e16fa /lib/gui/epixmap.cpp | |
| parent | efd0ff96e5fab635045a0e54f50216869559f838 (diff) | |
| download | enigma2-34d336d2c8e99b15045cd1ef7d40cbee4c0f18bb.tar.gz enigma2-34d336d2c8e99b15045cd1ef7d40cbee4c0f18bb.zip | |
experimental scaling for pixmaps, requires more work (surface is likely not an accel-surface)
Diffstat (limited to 'lib/gui/epixmap.cpp')
| -rw-r--r-- | lib/gui/epixmap.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/gui/epixmap.cpp b/lib/gui/epixmap.cpp index 84fec323..f20c1a9f 100644 --- a/lib/gui/epixmap.cpp +++ b/lib/gui/epixmap.cpp @@ -3,7 +3,7 @@ #include <lib/gui/ewidgetdesktop.h> 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; |
