summaryrefslogtreecommitdiffstats
path: root/tdegtk/tqtcairopainter.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-10-29 14:03:10 -0500
committerTimothy Pearson <[email protected]>2012-10-29 14:03:10 -0500
commit0bf8ed2645fa9721cdf2ebab5e81307e1649b967 (patch)
treed9c0d0e0c1d6d7090a32771266eb709bfcfb508a /tdegtk/tqtcairopainter.cpp
parent623f11f6000cb2f05f51c81e7a1c6fc02ce21907 (diff)
downloadgtk3-tqt-engine-0bf8ed2645fa9721cdf2ebab5e81307e1649b967.tar.gz
gtk3-tqt-engine-0bf8ed2645fa9721cdf2ebab5e81307e1649b967.zip
A few widgets are now working somewhat
Diffstat (limited to 'tdegtk/tqtcairopainter.cpp')
-rw-r--r--tdegtk/tqtcairopainter.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tdegtk/tqtcairopainter.cpp b/tdegtk/tqtcairopainter.cpp
index c19a736..6d3b2cf 100644
--- a/tdegtk/tqtcairopainter.cpp
+++ b/tdegtk/tqtcairopainter.cpp
@@ -327,16 +327,16 @@ void TQt3CairoPaintDevice::transferIntermediateSurface() {
if (!m_clipRegionEnabled) {
// Clipping disabled
- cairo_set_source_surface(m_devicePainter, m_intermediateSurface, 0, 0);
+ cairo_set_source_surface(m_devicePainter, m_intermediateSurface, m_offsetX, m_offsetY);
cairo_set_operator(m_devicePainter, overlayMerge?CAIRO_OPERATOR_OVER:CAIRO_OPERATOR_SOURCE);
cairo_paint(m_devicePainter);
}
else {
// Clipping enabled
cairo_surface_t* maskSurface = TQImageToCairoSurface(m_clipRegion);
- cairo_set_source_surface(m_devicePainter, m_intermediateSurface, 0, 0);
+ cairo_set_source_surface(m_devicePainter, m_intermediateSurface, m_offsetX, m_offsetY);
cairo_set_operator(m_devicePainter, overlayMerge?CAIRO_OPERATOR_OVER:CAIRO_OPERATOR_SOURCE);
- cairo_mask_surface(m_devicePainter, maskSurface, 0, 0);
+ cairo_mask_surface(m_devicePainter, maskSurface, m_offsetX, m_offsetY);
cairo_surface_destroy(maskSurface);
}
@@ -1083,16 +1083,18 @@ void TQt3CairoPaintDevice::setCairoTransformations() {
Constructs TQt3CairoPaintDevice on an existing QPainter
*/
-TQt3CairoPaintDevice::TQt3CairoPaintDevice( cairo_surface_t *cairosurface, int width, int height, cairo_t *overridepainter )
+TQt3CairoPaintDevice::TQt3CairoPaintDevice( cairo_surface_t *cairosurface, int x, int y, int width, int height, cairo_t *overridepainter )
: TQPaintDevice( TQInternal::Picture | TQInternal::ExternalDevice )
{
init();
+ m_offsetX = x;
+ m_offsetY = y;
if (width >= 0) {
m_width = width;
}
if (height >= 0) {
- m_height = width;
+ m_height = height;
}
if (overridepainter) {
m_overridePainter = overridepainter;
@@ -1138,6 +1140,8 @@ TQt3CairoPaintDevice::~TQt3CairoPaintDevice()
void TQt3CairoPaintDevice::init() {
m_width = -1;
m_height = -1;
+ m_offsetX = 0;
+ m_offsetY = 0;
m_intermediateSurface = NULL;
m_painter = NULL;