summaryrefslogtreecommitdiffstats
path: root/tdegtk/tqtcairopainter.h
diff options
context:
space:
mode:
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