2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <wildfox@kde.org>
3 2004, 2005, 2006 Rob Buis <buis@kde.org>
5 This file is part of the KDE project
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
23 #ifndef KRenderingDeviceQt_H
24 #define KRenderingDeviceQt_H
27 #include <QPainterPath>
29 #include "KRenderingDevice.h"
33 class KRenderingDeviceContextQt : public KRenderingDeviceContext
36 KRenderingDeviceContextQt(QPainter*);
37 virtual ~KRenderingDeviceContextQt();
39 virtual AffineTransform concatCTM(const AffineTransform&);
40 virtual AffineTransform ctm() const;
42 virtual IntRect mapFromVisual(const IntRect&);
43 virtual IntRect mapToVisual(const IntRect&);
45 virtual void clearPath();
46 virtual void addPath(const KCanvasPath*);
48 virtual GraphicsContext* createGraphicsContext();
52 QRectF pathBBox() const;
54 void setFillRule(KCWindRule);
64 class KRenderingDeviceQt : public KRenderingDevice
68 virtual ~KRenderingDeviceQt();
70 virtual bool isBuffered() const { return false; }
72 virtual KRenderingDeviceContext* popContext();
73 virtual void pushContext(KRenderingDeviceContext*);
75 // context management.
76 KRenderingDeviceContextQt* qtContext() const;
77 virtual KRenderingDeviceContext* contextForImage(KCanvasImage*) const;
79 virtual DeprecatedString stringForPath(const KCanvasPath*);
82 virtual KCanvasResource* createResource(const KCResourceType&) const;
83 virtual KRenderingPaintServer* createPaintServer(const KCPaintServerType&) const;
84 virtual KCanvasFilterEffect* createFilterEffect(const KCFilterEffectType&) const;
85 virtual KCanvasPath* createPath() const;
88 virtual RenderPath* createItem(RenderArena*, RenderStyle*, SVGStyledElement*, KCanvasPath*) const;