#include <qsdrvqt.h>
Inheritance diagram for QSDrvQt:
Public Methods | |
QSDrvQt () | |
virtual | ~QSDrvQt () |
virtual QSDrvQt * | copy () |
void | copySettingsFrom (const QSDrvQt *drv) |
virtual void | setDC (QPainter *p, double dpi=72.0, bool deletePainter=false) |
QPainter * | painter () const |
bool | deletePainter () const |
void | startDrawing () |
void | stopDrawing () |
void | clearCanvas (const QSGFill &f, const QSPt2f &pos, const QSPt2f &size) |
void | drawLine (const QSPt2f &one, const QSPt2f &two) |
void | beginPolyline (const QSPt2f &pos) |
void | drawPolylineTo (const QSPt2f &pos) |
void | endPolyline () |
QSPt2f | currPolylinePos () |
void | drawRect (const QSPt2f &p1, const QSPt2f &p2) |
void | drawPoly (const QSPt2f pts[], int npoints, const bool edges[]=NULL, int edgeAutoColor=0) |
void | drawEllipse (const QSPt2f &p1, const QSPt2f &p2) |
void | drawText (const QSPt2f &pos, const QString &text, int align=AlignLeft|AlignBottom) |
QSPt2f | textSize (const QString &text) |
void | drawRText (const QSPt2f &pos, int angle, const QString &text, int align=AlignLeft|AlignBottom) |
void | getRTextBoundingPoly (QSPt2f outPts[4], const QSPt2f &pos, int angle, const QString &text, int align=AlignLeft|AlignBottom) |
void | getPixmapBuffer (PixmapBuffer *buff, int pwidth, int pheight) |
void | drawPixmap (const QSPt2f &pos, PixmapBuffer *data) |
void | setFill (const QSGFill &f) |
void | setFont (const QSGFont &f) |
void | setLine (const QSGLine &l) |
QSGFont | currentFont () |
QSGFill | currentFill () |
QSGLine | currentLine () |
Static Public Methods | |
QPainter * | copyPainter (const QPainter *painter) |
QSGFont | toQSGFont (const QFont &f, const QColor &c, double dpi=72.0) |
QFont | toQFont (const QSGFont &f, double dpi=72.0) |
QSGColor | toQSGColor (const QColor &c) |
QColor | toQColor (const QSGColor &c) |
QSGFill | toQSGFill (const QBrush &b) |
QBrush | toQBrush (const QSGFill &f) |
QSGLine | toQSGLine (const QPen &p) |
QPen | toQPen (const QSGLine &p) |
Protected Methods | |
QPoint | align_rect (const QRect &r, int align) |
int | toInt (double value) |
void | set_auto_pen (int autoColor) |
Protected Attributes | |
QPainter * | m_paint |
QPointArray | m_vert_array |
QPointArray | m_edge_array |
QImage * | m_pixmap |
QSGLine | m_line |
QSGFill | m_cfill |
QSGFont | m_curr_font |
bool | m_delete_painter |
QPen | m_curr_pen |
QSPt2f | m_curr_polyline_pos |
int | m_curr_polyline_style |
double | m_curr_polyline_t |
double | m_curr_polyline_pattern_length |
double | m_curr_polyline_pattern [6] |
Static Protected Attributes | |
const int | defpatterns [4][6] |
|
Constructor. |
|
Destructor. |
|
Starts to draw a polyline. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Clear the canvas. Reimplemented from QSDrv. Reimplemented in QSDrvHitTest. |
|
Returns a copy of this object. Implements QSDrv. Reimplemented in QSDrvHitTest. |
|
Creates and returns a copy of painter. |
|
Copies painter, dpi settings. |
|
This function should return the current fill. Reimplemented from QSCanvasDrv. |
|
This function should return the current font. Reimplemented from QSCanvasDrv. |
|
This function should return the current line. Reimplemented from QSCanvasDrv. |
|
Returns the current pen position. Reimplemented from QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Returns 'delete' painter setting |
|
Draws a circle. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a line. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a pixmap. Notice that the pixmap buffer will be always the last requested one.'getPixmapBuffer' / 'drawPixmap' pair is always called together. Reimplemented from QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a polygon defined by 'npoints' points in 'pts'. Can change the current line ( if edgeAuto color != 0 ) Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw the next line segment. Wach out for setLine() call during drawPolyline2() Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a rectangle. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a rotated text. This must be reimplemented. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Draw a text. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Ends polyline. Reimplemented from QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
This method is always called before QSDrv::drawPixmap. The struct 'PixmapBuffer' must be filled with correct values. Pixmap width is requested to be equal to 'pwidth', pixmap height must be lower or equal to pheight ( see field 'lines' in 'PixmapBuffer' ). Reimplemented from QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Return size of a rotated text. This must be reimplemented. Implements QSCanvasDrv. |
|
Returns painter |
|
Sets a painter. If deletePainter is true, painter is deleted in destructor. This driver calls neither p->start(), nor p->stop() Reimplemented in QSDrvOpenGL. |
|
Set the current fill . Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Set the current font. Implements QSCanvasDrv. |
|
Set the current line style. Implements QSCanvasDrv. Reimplemented in QSDrvHitTest. |
|
Reimplemented from QSDrv::startDraw . Reimplemented from QSDrv. Reimplemented in QSDrvOpenGL. |
|
Reimplemented from QSDrv::stopDraw . Doesn,t call paint->end(). Reimplemented from QSDrv. Reimplemented in QSDrvOpenGL. |
|
Return the size of the text that will be printed by the corresponding QSDrv::drawText function. Implements QSCanvasDrv. |
|
Converts 'QSGFill' to 'QBrush' . |
|
Converts 'QSGColor' to 'QColor' . |
|
Converts 'QSGFont' to 'QFont' . |
|
Converts 'QSGLine' to 'QPen' . |
|
Converts 'QColor' to 'QSGColor' . |
|
Converts 'QBrush' to 'QSGFill' . |
|
Converts 'QFont' to 'QSGFont' . |
|
Converts 'QPen' to 'QSGLine' . |