OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 void RenderSVGResourceMarker::applyViewportClip(PaintInfo& paintInfo) | 73 void RenderSVGResourceMarker::applyViewportClip(PaintInfo& paintInfo) |
74 { | 74 { |
75 if (SVGRenderSupport::isOverflowHidden(this)) | 75 if (SVGRenderSupport::isOverflowHidden(this)) |
76 paintInfo.context->clip(m_viewport); | 76 paintInfo.context->clip(m_viewport); |
77 } | 77 } |
78 | 78 |
79 FloatRect RenderSVGResourceMarker::markerBoundaries(const AffineTransform& marke
rTransformation) const | 79 FloatRect RenderSVGResourceMarker::markerBoundaries(const AffineTransform& marke
rTransformation) const |
80 { | 80 { |
81 FloatRect coordinates = RenderSVGContainer::repaintRectInLocalCoordinates(); | 81 FloatRect coordinates = RenderSVGContainer::paintInvalidationRectInLocalCoor
dinates(); |
82 | 82 |
83 // Map repaint rect into parent coordinate space, in which the marker bounda
ries have to be evaluated | 83 // Map repaint rect into parent coordinate space, in which the marker bounda
ries have to be evaluated |
84 coordinates = localToParentTransform().mapRect(coordinates); | 84 coordinates = localToParentTransform().mapRect(coordinates); |
85 | 85 |
86 return markerTransformation.mapRect(coordinates); | 86 return markerTransformation.mapRect(coordinates); |
87 } | 87 } |
88 | 88 |
89 const AffineTransform& RenderSVGResourceMarker::localToParentTransform() const | 89 const AffineTransform& RenderSVGResourceMarker::localToParentTransform() const |
90 { | 90 { |
91 m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_vi
ewport.y()) * viewportTransform(); | 91 m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_vi
ewport.y()) * viewportTransform(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 SVGMarkerElement* marker = toSVGMarkerElement(element()); | 178 SVGMarkerElement* marker = toSVGMarkerElement(element()); |
179 ASSERT(marker); | 179 ASSERT(marker); |
180 | 180 |
181 SVGLengthContext lengthContext(marker); | 181 SVGLengthContext lengthContext(marker); |
182 float w = marker->markerWidth()->currentValue()->value(lengthContext); | 182 float w = marker->markerWidth()->currentValue()->value(lengthContext); |
183 float h = marker->markerHeight()->currentValue()->value(lengthContext); | 183 float h = marker->markerHeight()->currentValue()->value(lengthContext); |
184 m_viewport = FloatRect(0, 0, w, h); | 184 m_viewport = FloatRect(0, 0, w, h); |
185 } | 185 } |
186 | 186 |
187 } | 187 } |
OLD | NEW |