| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# ksvgiconpainter.h

    00001 /*
    00002     Copyright (C) 2002 Nikolas Zimmermann <wildfox@kde.org>
    00003     This file is part of the KDE project
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public License
    00016     aint with this library; see the file COPYING.LIB.  If not, write to
    00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, USA.
    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 KDECORE_EXPORT KSVGIconPainter
    00034 {
    00035 public:
    00036     KSVGIconPainter(int width, int height);
    00037     ~KSVGIconPainter();
    00038
    00039     void setDrawWidth(int dwidth);
    00040     void setDrawHeight(int dheight);
    00041
    00042     QImage *image();
    00043
    00044     QWMatrix *worldMatrix();
    00045
    00046     void finish();
    00047
    00048     void setUseFill(bool fill);
    00049     void setUseStroke(bool stroke);
    00050
    00051     void setStrokeWidth(double width);
    00052     void setStrokeMiterLimit(const QString &miter);
    00053     void setCapStyle(const QString &cap);
    00054     void setJoinStyle(const QString &join);
    00055     void setStrokeColor(const QString &stroke);
    00056     void setFillColor(const QString &fill);
    00057     void setFillRule(const QString &fillRule);
    00058     void setOpacity(const QString &opacity);
    00059     void setFillOpacity(const QString &fillOpacity);
    00060     void setStrokeOpacity(const QString &strokeOpacity);
    00061     void setStrokeDashOffset(const QString &dashOffset);
    00062     void setStrokeDashArray(const QString &dashes);
    00063
    00064     void setWorldMatrix(QWMatrix *worldMatrix);
    00065     void setClippingRect(int x, int y, int w, int h);
    00066
    00067     void drawRectangle(double x, double y, double w, double h, double rx, double ry);
    00068     void drawEllipse(double cx, double cy, double rx, double ry);
    00069     void drawLine(double x1, double y1, double x2, double y2);
    00070     void drawPolyline(QPointArray polyArray, int points = -1);
    00071     void drawPolygon(QPointArray polyArray);
    00072     void drawPath(const QString &data, bool fill);
    00073     void drawImage(double x, double y, QImage &image);
    00074
    00075     QColor parseColor(const QString &param);
    00076     Q_UINT32 toArtColor(const QColor &color);
    00077     Q_UINT32 parseOpacity(const QString &data);
    00078
    00079     double toPixel(const QString &s, bool hmode);
    00080     double dpi();
    00081
    00082     ArtGradientLinear *linearGradient(const QString &id);
    00083     void addLinearGradient(const QString &id, ArtGradientLinear *gradient);
    00084
    00085     QDomElement linearGradientElement(ArtGradientLinear *linear);
    00086     void addLinearGradientElement(ArtGradientLinear *gradient, QDomElement element);
    00087
    00088     ArtGradientRadial *radialGradient(const QString &id);
    00089     void addRadialGradient(const QString &id, ArtGradientRadial *gradient);
    00090
    00091     QDomElement radialGradientElement(ArtGradientRadial *radial);
    00092     void addRadialGradientElement(ArtGradientRadial *gradient, QDomElement element);
    00093
    00094     QWMatrix parseTransform(const QString &transform);
    00095
    00096 private:
    00097     struct Private;
    00098     Private *d;
    00099 };
    00100
    00101 #endif

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:18:12 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003