OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
10 * Copyright (C) 2011 University of Szeged | 10 * Copyright (C) 2011 University of Szeged |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // except that we ignore whether the stroke is none. | 58 // except that we ignore whether the stroke is none. |
59 | 59 |
60 FloatRect box = m_fillBoundingBox; | 60 FloatRect box = m_fillBoundingBox; |
61 | 61 |
62 const float strokeWidth = this->strokeWidth(); | 62 const float strokeWidth = this->strokeWidth(); |
63 if (strokeWidth <= 0) | 63 if (strokeWidth <= 0) |
64 return box; | 64 return box; |
65 | 65 |
66 float delta = strokeWidth / 2; | 66 float delta = strokeWidth / 2; |
67 | 67 |
68 if (svgStyle.hasMiterJoinStyle()) { | 68 if (style()->hasMiterJoinStyle()) { |
69 const float miter = svgStyle.strokeMiterLimit(); | 69 const float miter = svgStyle.strokeMiterLimit(); |
70 if (miter < M_SQRT2 && svgStyle.hasSquareCapStyle()) | 70 if (miter < M_SQRT2 && style()->hasSquareCapStyle()) |
71 delta *= M_SQRT2; | 71 delta *= M_SQRT2; |
72 else | 72 else |
73 delta *= miter; | 73 delta *= miter; |
74 } else if (svgStyle.hasSquareCapStyle()) { | 74 } else if (style()->hasSquareCapStyle()) { |
75 delta *= M_SQRT2; | 75 delta *= M_SQRT2; |
76 } | 76 } |
77 | 77 |
78 box.inflate(delta); | 78 box.inflate(delta); |
79 return box; | 79 return box; |
80 } | 80 } |
81 | 81 |
82 FloatRect LayoutSVGPath::calculateUpdatedStrokeBoundingBox() const { | 82 FloatRect LayoutSVGPath::calculateUpdatedStrokeBoundingBox() const { |
83 FloatRect strokeBoundingBox = m_strokeBoundingBox; | 83 FloatRect strokeBoundingBox = m_strokeBoundingBox; |
84 if (!m_markerPositions.isEmpty()) | 84 if (!m_markerPositions.isEmpty()) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 SVGMarkerData markerData( | 141 SVGMarkerData markerData( |
142 m_markerPositions, | 142 m_markerPositions, |
143 markerStart ? markerStart->orientType() == SVGMarkerOrientAutoStartReverse | 143 markerStart ? markerStart->orientType() == SVGMarkerOrientAutoStartReverse |
144 : false); | 144 : false); |
145 path().apply(&markerData, SVGMarkerData::updateFromPathElement); | 145 path().apply(&markerData, SVGMarkerData::updateFromPathElement); |
146 markerData.pathIsDone(); | 146 markerData.pathIsDone(); |
147 } | 147 } |
148 | 148 |
149 } // namespace blink | 149 } // namespace blink |
OLD | NEW |