28 #ifndef __SCPAINTEREXBASE_H__
29 #define __SCPAINTEREXBASE_H__
33 #include <QGlobalStatic>
39 #include "scribusapi.h"
42 #include "fpointarray.h"
44 #include "vgradientex.h"
45 #include "sccolorshade.h"
58 enum FillMode { None, Solid, Gradient, Pattern };
59 enum ColorMode { rgbMode = 1, cmykMode = 2 };
60 enum ImageMode { cmykImages, rgbImages, rawImages };
61 enum Capabilities{ basic = 0, transparencies = 1, patterns = 2 };
63 virtual Capabilities capabilities() {
return basic; }
64 virtual bool hasCapability(Capabilities cap) {
return ((m_capabilities & (
int) cap) != 0); }
66 virtual int supportedColorModes() = 0;
67 virtual ColorMode preferredColorMode() = 0;
68 virtual ImageMode imageMode() = 0;
70 virtual void begin() = 0;
71 virtual void end() = 0;
72 virtual void clear() = 0;
76 virtual void setWorldMatrix(
const QTransform & ) = 0;
77 virtual const QTransform worldMatrix() = 0;
78 virtual void translate(
double,
double ) = 0;
79 virtual void rotate(
double ) = 0;
80 virtual void scale(
double,
double ) = 0;
83 virtual void moveTo(
const double &,
const double & ) = 0;
84 virtual void lineTo(
const double &,
const double & ) = 0;
86 virtual void newPath() = 0;
87 virtual void fillPath() = 0;
88 virtual void strokePath() = 0;
89 virtual void setFillRule(
bool fillRule ) = 0;
90 virtual bool fillRule() = 0;
91 virtual void setFillMode(
int fill ) = 0;
92 virtual int fillMode() = 0;
93 virtual void setStrokeMode(
int stroke ) = 0;
94 virtual int strokeMode() = 0;
95 virtual void setGradient( VGradientEx::Type mode,
FPoint orig,
FPoint vec,
FPoint foc,
double scale,
double skew ) = 0;
96 virtual void setPattern(
ScPattern *pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY) = 0;
98 virtual void setMaskMode(
int mask ) = 0;
99 virtual void setGradientMask(VGradientEx::Type mode,
FPoint orig,
FPoint vec,
FPoint foc,
double scale,
double skew) = 0;
100 virtual void setPatternMask(
ScPattern *pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY) = 0;
108 virtual void setClipPath() = 0;
110 virtual void drawImage(
ScImage *image, ScPainterExBase::ImageMode mode ) = 0;
111 virtual void setupPolygon(
FPointArray *points,
bool closed =
true) = 0;
112 virtual void drawPolygon() = 0;
113 virtual void drawPolyLine() = 0;
115 virtual void drawRect(
double,
double,
double,
double) = 0;
121 virtual void setPen(
const ScColorShade &c,
double w, Qt::PenStyle st, Qt::PenCapStyle ca, Qt::PenJoinStyle jo ) = 0;
122 virtual void setPenOpacity(
double op ) = 0;
123 virtual void setLineWidth(
double w) = 0;
124 virtual void setDash(
const QVector<double>& array,
double ofs) = 0;
126 virtual void setBrushOpacity(
double op ) = 0;
127 virtual void setOpacity(
double op ) = 0;
128 virtual void setFont(
const QFont &f ) = 0;
129 virtual QFont font() = 0;
132 virtual void save() = 0;
133 virtual void restore() = 0;
135 virtual void setRasterOp(
int op ) = 0;
136 virtual void setBlendModeFill(
int blendMode ) = 0;
137 virtual void setBlendModeStroke(
int blendMode ) = 0;
144 QTransform m_patternTransform;
Definition: sccolorshade.h:29
Definition: scpattern.h:36
A point with floating point precision.
Definition: fpoint.h:43
Definition: vgradientex.h:80
Definition: scpainterexbase.h:50
Definition: fpointarray.h:42