m_visible_region.rects.clear();
}
-void eSubtitleWidget::setPixmap(ePtr<gPixmap> &pixmap, gRegion changed)
+void eSubtitleWidget::setPixmap(ePtr<gPixmap> &pixmap, gRegion changed, eRect pixmap_dest)
{
m_pixmap = pixmap;
+ m_pixmap_dest = pixmap_dest;
changed.scale(size().width(), pixmap->size().width(), size().height(), pixmap->size().height());
eWidget::event(event, data, data2);
if (m_pixmap)
- painter.blitScale(m_pixmap, eRect(ePoint(0, 0), size()));
- else if (m_page_ok)
+ {
+ eRect r = m_pixmap_dest;
+ r.scale(size().width(), 720, size().height(), 576);
+ painter.blitScale(m_pixmap, r);
+ } else if (m_page_ok)
{
int elements = m_page.m_elements.size();
painter.setFont(subtitleStyles[Subtitle_TTX].font);
void setPage(const eDVBSubtitlePage &p);
void setPage(const ePangoSubtitlePage &p);
void clearPage();
- void setPixmap(ePtr<gPixmap> &pixmap, gRegion changed);
+ void setPixmap(ePtr<gPixmap> &pixmap, gRegion changed, eRect dest = eRect(0, 0, 720, 576));
typedef enum { Subtitle_TTX, Subtitle_Regular, Subtitle_Bold, Subtitle_Italic, Subtitle_MAX } subfont_t;
struct eSubtitleStyle
static eSubtitleStyle subtitleStyles[Subtitle_MAX];
ePtr<gPixmap> m_pixmap; // pixmap to paint on next evtPaint
+ eRect m_pixmap_dest;
};
#endif