QTeXEngine
0.2
|
#include <QTeXEngine.h>
Public Member Functions | |
virtual bool | begin (QPaintDevice *) |
virtual void | drawEllipse (const QRectF &) |
virtual void | drawImage (const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags) |
virtual void | drawLines (const QLineF *, int) |
virtual void | drawPath (const QPainterPath &path) |
virtual void | drawPixmap (const QRectF &, const QPixmap &, const QRectF &) |
virtual void | drawPoints (const QPointF *points, int pointCount) |
virtual void | drawPolygon (const QPointF *, int, PolygonDrawMode) |
virtual void | drawRects (const QRectF *, int) |
virtual void | drawTextItem (const QPointF &, const QTextItem &) |
virtual bool | end () |
void | exportFontSizes (bool on=true) |
QTeXPaintEngine (const QString &, QTeXPaintDevice::Unit u=QTeXPaintDevice::pt) | |
void | setDocumentMode (bool on=true) |
void | setEscapeTextMode (bool on=true) |
Enables/Disables escaping of special characters in texts. More... | |
void | setGrayScale (bool on=true) |
Enables/Disables gray scale output. More... | |
void | setOutputMode (QTeXPaintDevice::OutputMode mode) |
Set output syntax. More... | |
void | setTextHorizontalAlignment (Qt::Alignment alignment) |
void | setUnit (QTeXPaintDevice::Unit u) |
Set length unit. More... | |
virtual QPaintEngine::Type | type () const |
virtual void | updateState (const QPaintEngineState &) |
~QTeXPaintEngine () | |
Private Types | |
enum | Shape { Line, Polygon, Polyline, Rect, Ellipse, Path, Points } |
Private Member Functions | |
bool | addNewBrushColor () |
Returns true if a new color command should be added. More... | |
bool | addNewPatternColor () |
bool | addNewPenColor () |
QString | beginScope () |
bool | changedClipping () |
QString | clipPath () |
QString | color (const QColor &col) |
QPointF | convertPoint (const QPointF &p) |
QString | defineColor (const QColor &c, const QString &name) |
QString | drawPgfShape (Shape shape, const QString &path) |
void | drawPixmap (const QPixmap &pix, const QRectF &p) |
Draws pixmap pix in a given rectangle. More... | |
QString | drawShape (Shape shape, const QString &path) |
QString | drawTikzShape (Shape shape, const QString &path) |
bool | emptyStringOperation () |
Returns true if draw operation has NoBrush and NoPen. More... | |
QString | endScope () |
QString | indentString (const QString &s) |
QString | path (const QPainterPath &path) |
QString | pgfBrush (const QBrush &brush) |
QString | pgfPath (const QPainterPath &path) |
QString | pgfPen (const QPen &pen) |
QString | pgfPoint (const QPointF &p) |
double | resFactorX () |
double | resFactorY () |
QString | tikzBrush (const QBrush &brush) |
QString | tikzPath (const QPainterPath &path) |
QString | tikzPen (const QPen &pen) |
QString | tikzPoint (const QPointF &p) |
QString | unit () |
double | unitFactor () |
void | writeToFile (const QString &s) |
Private Attributes | |
QPainterPath | d_clip_path |
QColor | d_current_color |
bool | d_document_mode |
bool | d_escape_text |
bool | d_font_size |
bool | d_gray_scale |
Qt::Alignment | d_horizontal_alignment |
bool | d_open_scope |
QColor | d_pattern_color |
bool | d_pgf_mode |
int | d_pixmap_index |
QTeXPaintDevice::Unit | d_unit |
QFile * | file |
QString | fname |
Name of the output file. More... | |
|
private |
QTeXPaintEngine::QTeXPaintEngine | ( | const QString & | f, |
QTeXPaintDevice::Unit | u = QTeXPaintDevice::pt |
||
) |
References d_clip_path, d_current_color, d_document_mode, d_escape_text, d_font_size, d_gray_scale, d_horizontal_alignment, d_open_scope, d_pattern_color, and d_pgf_mode.
|
inline |
|
private |
Returns true if a new color command should be added.
References changedClipping(), and d_current_color.
Referenced by tikzBrush().
|
private |
References d_pattern_color.
Referenced by tikzBrush().
|
private |
References changedClipping(), and d_current_color.
Referenced by drawPoints(), drawTextItem(), and tikzPen().
|
virtual |
References d_document_mode, d_pgf_mode, file, fname, path(), tikzPath(), and unit().
|
private |
References clipPath(), d_current_color, d_pattern_color, d_pgf_mode, and indentString().
Referenced by writeToFile().
|
private |
References clipPath(), and d_clip_path.
Referenced by addNewBrushColor(), addNewPenColor(), and writeToFile().
|
private |
References d_pgf_mode, path(), pgfPath(), and tikzPath().
Referenced by beginScope(), and changedClipping().
|
private |
References d_gray_scale.
Referenced by drawPoints(), drawTextItem(), emptyStringOperation(), pgfBrush(), pgfPen(), tikzBrush(), and tikzPen().
|
private |
References resFactorX(), and resFactorY().
Referenced by drawEllipse(), drawPixmap(), drawPoints(), drawTextItem(), pgfPath(), and tikzPath().
|
private |
References d_gray_scale.
Referenced by pgfBrush(), and tikzBrush().
|
virtual |
References convertPoint(), d_pgf_mode, drawShape(), Ellipse, emptyStringOperation(), path(), pgfPoint(), resFactorX(), resFactorY(), tikzPoint(), unit(), and writeToFile().
|
virtual |
References drawPixmap().
|
virtual |
References drawShape(), Line, path(), and writeToFile().
|
virtual |
References drawShape(), emptyStringOperation(), Path, path(), and writeToFile().
|
private |
|
virtual |
Referenced by drawImage().
|
private |
Draws pixmap pix in a given rectangle.
References convertPoint(), d_pixmap_index, file, pgfPoint(), resFactorX(), resFactorY(), and unit().
|
virtual |
References addNewPenColor(), color(), convertPoint(), d_current_color, d_pgf_mode, emptyStringOperation(), path(), pgfPoint(), tikzPoint(), and writeToFile().
|
virtual |
References drawShape(), emptyStringOperation(), path(), Polygon, Polyline, and writeToFile().
|
virtual |
References drawShape(), emptyStringOperation(), Path, path(), and writeToFile().
|
private |
References d_pgf_mode, drawPgfShape(), drawTikzShape(), and path().
Referenced by drawEllipse(), drawLines(), drawPath(), drawPolygon(), and drawRects().
|
virtual |
References addNewPenColor(), color(), convertPoint(), d_current_color, d_escape_text, d_font_size, d_horizontal_alignment, pgfPoint(), and writeToFile().
|
private |
References Line, path(), Polyline, tikzBrush(), and tikzPen().
Referenced by drawShape().
|
private |
Returns true if draw operation has NoBrush and NoPen.
References color().
Referenced by drawEllipse(), drawPath(), drawPoints(), drawPolygon(), and drawRects().
|
virtual |
References d_document_mode, d_open_scope, d_pgf_mode, endScope(), and file.
|
private |
References d_pgf_mode.
Referenced by end(), and writeToFile().
|
inline |
References d_font_size.
Referenced by QTeXPaintDevice::exportFontSizes().
|
private |
Referenced by beginScope(), and writeToFile().
|
private |
References d_pgf_mode, pgfPath(), and tikzPath().
Referenced by begin(), clipPath(), drawEllipse(), drawLines(), drawPath(), drawPgfShape(), drawPoints(), drawPolygon(), drawRects(), drawShape(), drawTikzShape(), pgfPath(), and tikzPath().
|
private |
References color(), and defineColor().
Referenced by drawPgfShape().
|
private |
References convertPoint(), path(), and pgfPoint().
Referenced by clipPath(), and path().
|
private |
References color(), and unit().
Referenced by drawPgfShape().
|
private |
References unit().
Referenced by drawEllipse(), drawPixmap(), drawPoints(), drawTextItem(), and pgfPath().
|
private |
References unitFactor().
Referenced by convertPoint(), drawEllipse(), and drawPixmap().
|
private |
References unitFactor().
Referenced by convertPoint(), drawEllipse(), and drawPixmap().
|
inline |
References d_document_mode.
Referenced by QTeXPaintDevice::setDocumentMode().
|
inline |
Enables/Disables escaping of special characters in texts.
References d_escape_text.
Referenced by QTeXPaintDevice::setEscapeTextMode().
|
inline |
Enables/Disables gray scale output.
References d_gray_scale.
Referenced by QTeXPaintDevice::setColorMode().
|
inline |
Set output syntax.
References d_pgf_mode, and QTeXPaintDevice::Pgf.
Referenced by QTeXPaintDevice::setOutputMode().
|
inline |
References d_horizontal_alignment.
Referenced by QTeXPaintDevice::setTextHorizontalAlignment().
|
inline |
|
private |
References addNewBrushColor(), addNewPatternColor(), color(), d_current_color, d_pattern_color, and defineColor().
Referenced by drawTikzShape().
|
private |
References convertPoint(), path(), and tikzPoint().
Referenced by begin(), clipPath(), and path().
|
private |
References addNewPenColor(), color(), d_current_color, and unit().
Referenced by drawTikzShape().
|
private |
References unit().
Referenced by drawEllipse(), drawPoints(), and tikzPath().
|
inlinevirtual |
|
private |
References QTeXPaintDevice::bp, QTeXPaintDevice::cm, d_unit, QTeXPaintDevice::em, QTeXPaintDevice::ex, QTeXPaintDevice::in, QTeXPaintDevice::mm, and QTeXPaintDevice::pt.
Referenced by begin(), drawEllipse(), drawPixmap(), pgfPen(), pgfPoint(), tikzPen(), and tikzPoint().
|
private |
References QTeXPaintDevice::bp, QTeXPaintDevice::cm, d_unit, QTeXPaintDevice::em, QTeXPaintDevice::ex, QTeXPaintDevice::in, QTeXPaintDevice::mm, and QTeXPaintDevice::pt.
Referenced by resFactorX(), and resFactorY().
|
inlinevirtual |
|
private |
References beginScope(), changedClipping(), d_clip_path, d_open_scope, d_pgf_mode, endScope(), file, and indentString().
Referenced by drawEllipse(), drawLines(), drawPath(), drawPoints(), drawPolygon(), drawRects(), and drawTextItem().
|
private |
Referenced by changedClipping(), QTeXPaintEngine(), and writeToFile().
|
private |
Referenced by addNewBrushColor(), addNewPenColor(), beginScope(), drawPoints(), drawTextItem(), QTeXPaintEngine(), tikzBrush(), and tikzPen().
|
private |
Referenced by begin(), end(), QTeXPaintEngine(), and setDocumentMode().
|
private |
Referenced by drawTextItem(), QTeXPaintEngine(), and setEscapeTextMode().
|
private |
Referenced by drawTextItem(), exportFontSizes(), and QTeXPaintEngine().
|
private |
Referenced by color(), defineColor(), QTeXPaintEngine(), and setGrayScale().
|
private |
Referenced by drawTextItem(), QTeXPaintEngine(), and setTextHorizontalAlignment().
|
private |
Referenced by end(), QTeXPaintEngine(), and writeToFile().
|
private |
Referenced by addNewPatternColor(), beginScope(), QTeXPaintEngine(), and tikzBrush().
|
private |
Referenced by begin(), beginScope(), clipPath(), drawEllipse(), drawPoints(), drawShape(), end(), endScope(), path(), QTeXPaintEngine(), setOutputMode(), and writeToFile().
|
private |
Referenced by drawPixmap().
|
private |
Referenced by setUnit(), unit(), and unitFactor().
|
private |
Referenced by begin(), drawPixmap(), end(), and writeToFile().
|
private |
Name of the output file.
Referenced by begin().