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>
30 #include "KRenderingDevice.h"
34 class KRenderingDeviceContextQt : public KRenderingDeviceContext
37 KRenderingDeviceContextQt(QPainter*);
38 virtual ~KRenderingDeviceContextQt();
40 virtual AffineTransform concatCTM(const AffineTransform&);
41 virtual AffineTransform ctm() const;
43 virtual IntRect mapFromVisual(const IntRect&);
44 virtual IntRect mapToVisual(const IntRect&);
46 virtual void clearPath();
47 virtual void addPath(const Path&);
49 virtual GraphicsContext* createGraphicsContext();
53 QRectF pathBBox() const;
55 void setFillRule(WindRule);
65 class KRenderingDeviceQt : public KRenderingDevice
69 virtual ~KRenderingDeviceQt();
71 virtual bool isBuffered() const { return false; }
73 virtual KRenderingDeviceContext* popContext();
74 virtual void pushContext(KRenderingDeviceContext*);
76 // context management.
77 KRenderingDeviceContextQt* qtContext() const;
78 virtual KRenderingDeviceContext* contextForImage(SVGResourceImage*) const;
81 virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const;
82 virtual PassRefPtr<SVGPaintServer> createPaintServer(const SVGPaintServerType&) const;
83 virtual SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&) const;