ksvgiconpainter.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KSVGIconPainter_H
00022 #define KSVGIconPainter_H
00023
00024 #include <libart_lgpl/art_render.h>
00025 #include <libart_lgpl/art_render_gradient.h>
00026
00027 class QImage;
00028 class QColor;
00029 class QWMatrix;
00030 class QDomElement;
00031 class QPointArray;
00032
00033 class KSVGIconPainter
00034 {
00035 public:
00036 KSVGIconPainter(int width, int height, int dwidth, int dheight);
00037 ~KSVGIconPainter();
00038
00039 QImage *image();
00040
00041 QWMatrix *worldMatrix();
00042
00043 void finish();
00044
00045 void setUseFill(bool fill);
00046 void setUseStroke(bool stroke);
00047
00048 void setStrokeWidth(double width);
00049 void setStrokeMiterLimit(const QString &miter);
00050 void setCapStyle(const QString &cap);
00051 void setJoinStyle(const QString &join);
00052 void setStrokeColor(const QString &stroke);
00053 void setFillColor(const QString &fill);
00054 void setFillRule(const QString &fillRule);
00055 void setOpacity(const QString &opacity);
00056 void setFillOpacity(const QString &fillOpacity);
00057 void setStrokeOpacity(const QString &strokeOpacity);
00058 void setStrokeDashOffset(const QString &dashOffset);
00059 void setStrokeDashArray(const QString &dashes);
00060
00061 void setWorldMatrix(QWMatrix *worldMatrix);
00062 void setClippingRect(int x, int y, int w, int h);
00063
00064 void drawRectangle(double x, double y, double w, double h, double rx, double ry);
00065 void drawEllipse(double cx, double cy, double rx, double ry);
00066 void drawLine(double x1, double y1, double x2, double y2);
00067 void drawPolyline(QPointArray polyArray, int points = -1);
00068 void drawPolygon(QPointArray polyArray);
00069 void drawPath(const QString &data, bool fill);
00070 void drawImage(double x, double y, QImage &image);
00071
00072 QColor parseColor(const QString ¶m);
00073 Q_UINT32 toArtColor(QColor color);
00074 Q_UINT32 parseOpacity(QString data);
00075
00076 double toPixel(const QString &s, bool hmode);
00077 double dpi();
00078
00079 ArtGradientLinear *linearGradient(const QString &id);
00080 void addLinearGradient(const QString &id, ArtGradientLinear *gradient);
00081
00082 QDomElement linearGradientElement(ArtGradientLinear *linear);
00083 void addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element);
00084
00085 ArtGradientRadial *radialGradient(const QString &id);
00086 void addRadialGradient(const QString &id, ArtGradientRadial *gradient);
00087
00088 QDomElement radialGradientElement(ArtGradientRadial *radial);
00089 void addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element);
00090
00091 QWMatrix parseTransform(const QString &transform);
00092
00093 private:
00094 struct Private;
00095 Private *d;
00096 };
00097
00098 #endif
This file is part of the documentation for kdelibs Version 3.1.5.