summaryrefslogtreecommitdiffstats
path: root/tdegtk/tqtcairopainter.h
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-10-15 13:02:37 -0500
committerTimothy Pearson <[email protected]>2012-10-15 13:02:37 -0500
commit623f11f6000cb2f05f51c81e7a1c6fc02ce21907 (patch)
treeebff174e76c82e87e00f0f167073c2d435fef91a /tdegtk/tqtcairopainter.h
parent467876d56afdf133bdce18b7a1ed13a303e82703 (diff)
downloadgtk3-tqt-engine-623f11f6000cb2f05f51c81e7a1c6fc02ce21907.tar.gz
gtk3-tqt-engine-623f11f6000cb2f05f51c81e7a1c6fc02ce21907.zip
Fix pixel imperfection, image drawing, and clipping problems
Update test suite
Diffstat (limited to 'tdegtk/tqtcairopainter.h')
-rw-r--r--tdegtk/tqtcairopainter.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/tdegtk/tqtcairopainter.h b/tdegtk/tqtcairopainter.h
index 404c526..20a03d3 100644
--- a/tdegtk/tqtcairopainter.h
+++ b/tdegtk/tqtcairopainter.h
@@ -4,7 +4,7 @@
**
** Copyright (C) 2012 Timothy Pearson. All rights reserved.
**
-** This file is part of the TDE Qt4 style interface
+** This file is part of the TDE GTK3 style interface
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
@@ -18,8 +18,8 @@
**
**********************************************************************/
-#ifndef TDEQT4PAINTER_H
-#define TDEQT4PAINTER_H
+#ifndef TQTCAIROPAINTER_H
+#define TQTCAIROPAINTER_H
#define TQT_NO_COMPAT_NAMES
#include "ntqpaintdevice.h"
@@ -40,14 +40,16 @@ typedef TQPtrStack<TQWMatrix> TQWMatrixStack;
class Q_EXPORT TQt3CairoPaintDevice : public TQPaintDevice // picture class
{
public:
- TQt3CairoPaintDevice( cairo_surface_t * );
+ TQt3CairoPaintDevice( cairo_surface_t *, int width = -1, int height = -1, cairo_t *overridepainter = NULL );
~TQt3CairoPaintDevice();
-
+
protected:
bool cmd( int, TQPainter *, TQPDevCmdParam * );
int metric( int ) const;
-
+
private:
+ void init();
+ void updateSurfaceDimensions() const;
void resetIntermediateSurface();
void transferIntermediateSurface();
@@ -69,12 +71,16 @@ class Q_EXPORT TQt3CairoPaintDevice : public TQPaintDevice // picture class
void drawTextInRect(TQPainter *p, TQRect rect, int textFlags, const TQString &str);
void setCairoTransformations();
-
+
private:
+ mutable int m_width;
+ mutable int m_height;
+
cairo_surface_t *m_surface;
cairo_surface_t *m_intermediateSurface;
cairo_t *m_painter;
cairo_t *m_devicePainter;
+ cairo_t *m_overridePainter;
cairo_matrix_t m_worldMatrix;
cairo_matrix_t m_viewportMatrix;
bool m_worldMatrixEnabled;
@@ -97,4 +103,4 @@ class Q_EXPORT TQt3CairoPaintDevice : public TQPaintDevice // picture class
bool m_tabStopArrayValid;
};
-#endif // TDEQT4PAINTER_H
+#endif // TQTCAIROPAINTER_H