2 Copyright (C) 2006 Nikolas Zimmermann <wildfox@kde.org>
4 This file is part of the KDE project
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 aint with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
25 #include "SVGPaintServerSolid.h"
27 #include "KRenderingDeviceQt.h"
28 #include "RenderPath.h"
32 bool SVGPaintServerSolid::setup(KRenderingDeviceContext* context, const RenderObject* object, SVGPaintTargetType type) const
34 KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
36 RenderStyle* renderStyle = object->style();
37 // TODO? qtContext->painter().setOpacity(renderStyle->opacity());
41 if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
42 c.setAlphaF(renderStyle->svgStyle()->fillOpacity());
45 qtContext->painter().setBrush(brush);
46 qtContext->setFillRule(renderStyle->svgStyle()->fillRule());
48 /* if(isPaintingText()) ... */
51 if((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
52 c.setAlphaF(renderStyle->svgStyle()->strokeOpacity());
55 setPenProperties(object, renderStyle, pen);
56 qtContext->painter().setPen(pen);
58 /* if(isPaintingText()) ... */
64 } // namespace WebCore