28 #ifndef __SCPAINTEREX_PS2_H__
29 #define __SCPAINTEREX_PS2_H__
33 #include <QGlobalStatic>
40 #include <QTextStream>
42 #include "scribusapi.h"
44 #include "colormgmt/sccolormgmtengine.h"
46 #include "fpointarray.h"
47 #include "vgradient.h"
48 #include "scpainterexbase.h"
56 ScPainterExBase::ColorMode colorMode;
64 QString outputProfile;
79 virtual int supportedColorModes() {
return (
int) (rgbMode|cmykMode); }
80 virtual ColorMode preferredColorMode() {
return m_colorMode; }
81 virtual void setPreferredColorMode(ScPainterEx_Ps2::ColorMode colorMode) { m_colorMode = colorMode; }
82 virtual ImageMode imageMode();
90 virtual void setWorldMatrix(
const QTransform & );
91 virtual const QTransform worldMatrix();
92 virtual void translate(
double,
double );
93 virtual void rotate(
double );
94 virtual void scale(
double,
double );
97 virtual void moveTo(
const double &,
const double & );
98 virtual void lineTo(
const double &,
const double & );
100 virtual void newPath();
101 virtual void closePath();
102 virtual void fillPath();
103 virtual void strokePath();
104 virtual void setFillRule(
bool fillRule );
105 virtual bool fillRule() {
return m_fillRule; }
106 virtual void setFillMode(
int fill );
107 virtual int fillMode() {
return m_fillMode; }
108 virtual void setStrokeMode(
int fill );
109 virtual int strokeMode() {
return m_strokeMode; }
110 virtual void setGradient( VGradientEx::Type mode,
FPoint orig,
FPoint vec,
FPoint foc,
double scale,
double skew);
111 virtual void setPattern(
ScPattern *pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY);
113 virtual void setMaskMode(
int mask ) {};
114 virtual void setGradientMask(VGradientEx::Type mode,
FPoint orig,
FPoint vec,
FPoint foc,
double scale,
double skew) {};
115 virtual void setPatternMask(
ScPattern *pattern,
double scaleX,
double scaleY,
double offsetX,
double offsetY,
double rotation,
double skewX,
double skewY,
bool mirrorX,
bool mirrorY) {};
123 virtual void setClipPath();
125 virtual void drawImage(
ScImage *image, ScPainterExBase::ImageMode mode );
126 virtual void drawRGBImage_ps2(
ScImage *image );
127 virtual void drawCMYKImage_ps2(
ScImage *image );
129 virtual bool hasAlphaChannel(
ScImage* image );
131 virtual void setupPolygon(
FPointArray *points,
bool closed =
true);
132 virtual void drawPolygon();
133 virtual void drawPolyLine();
135 virtual void drawRect(
double,
double,
double,
double);
141 virtual void setPen(
const ScColorShade &c,
double w, Qt::PenStyle st, Qt::PenCapStyle ca, Qt::PenJoinStyle jo );
142 virtual void setPenOpacity(
double op );
143 virtual void setLineWidth(
double w);
144 virtual void setDash(
const QVector<double>& array,
double ofs);
146 virtual void setBrushOpacity(
double op );
147 virtual void setOpacity(
double op );
148 virtual void setFont(
const QFont &f );
149 virtual QFont font();
153 virtual void restore();
155 virtual void setRasterOp(
int op );
156 virtual void setBlendModeFill(
int blendMode ) {};
157 virtual void setBlendModeStroke(
int blendMode ) {};
161 virtual void writeRGBImageToStream_Ascii85 (
ScImage* image );
162 virtual void writeRGBImageToStream_AsciiHex (
ScImage* image );
163 virtual void writeCMYKImageToStream_Ascii85(
ScImage* image );
164 virtual void writeCMYKImageToStream_AsciiHex(
ScImage* image );
165 virtual void writeMaskToStream ( QImage* image );
175 QTextStream m_stream;
176 ColorMode m_colorMode;
177 AsciiEncoding m_encoding;
187 void drawVPath(
int mode );
189 void drawLinearGradient(
VGradientEx& gradient,
const QRect& rect );
190 void drawLinearGradient_RGB(
VGradientEx& gradient,
const QRect& rect );
191 void drawLinearGradient_CMYK(
VGradientEx& gradient,
const QRect& rect );
192 void drawCircularGradient(
VGradientEx& gradient,
const QRect& rect );
193 void drawCircularGradient_RGB(
VGradientEx& gradient,
const QRect& rect );
194 void drawCircularGradient_CMYK(
VGradientEx& gradient,
const QRect& rect );
195 void getPathBoundingBox(
FPointArray* points, QRect& r );
197 void transformPoints(
const FPoint* in,
FPoint* out, uint length );
201 unsigned int m_width;
202 unsigned int m_height;
205 QTransform m_pageTrans;
214 double m_patternScaleX;
215 double m_patternScaleY;
216 double m_patternOffsetX;
217 double m_patternOffsetY;
218 double m_patternRotation;
219 double m_patternSkewX;
220 double m_patternSkewY;
221 bool m_patternMirrorX;
222 bool m_patternMirrorY;
226 double m_strokeTrans;
230 Qt::PenCapStyle m_lineEnd;
232 Qt::PenJoinStyle m_lineJoin;
234 QVector<double> m_array;
237 QStack<QTransform> m_stack;
241 bool m_drawingClosedPath;
250 void transformImage( QImage* image, uchar* data,
int scan);
Definition: sccolorprofile.h:16
Definition: sccolorshade.h:29
Definition: scpattern.h:36
A point with floating point precision.
Definition: fpoint.h:43
Definition: scpainterex_ps2.h:52
the Document Class
Definition: scribusdoc.h:90
Definition: vgradientex.h:80
Definition: scpainterexbase.h:50
Definition: fpointarray.h:42
Definition: scpainterex_ps2.h:72