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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2006 Apple Computer, Inc | 5 * Copyright (C) 2006 Apple Computer, Inc |
6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #if ENABLE(SVG) | 27 #if ENABLE(SVG) |
28 #include "AffineTransform.h" | 28 #include "AffineTransform.h" |
29 #include "FloatRect.h" | 29 #include "FloatRect.h" |
30 #include "RenderSVGModelObject.h" | 30 #include "RenderSVGModelObject.h" |
31 #include "SVGMarkerLayoutInfo.h" | 31 #include "SVGMarkerLayoutInfo.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 class FloatPoint; | 35 class FloatPoint; |
36 class GraphicsContextStateSaver; | |
37 class RenderSVGContainer; | 36 class RenderSVGContainer; |
38 class SVGStyledTransformableElement; | 37 class SVGStyledTransformableElement; |
39 | 38 |
40 class RenderSVGPath : public RenderSVGModelObject { | 39 class RenderSVGPath : public RenderSVGModelObject { |
41 public: | 40 public: |
42 explicit RenderSVGPath(SVGStyledTransformableElement*); | 41 explicit RenderSVGPath(SVGStyledTransformableElement*); |
43 virtual ~RenderSVGPath(); | 42 virtual ~RenderSVGPath(); |
44 | 43 |
45 const Path& path() const { return m_path; } | 44 const Path& path() const { return m_path; } |
46 void setNeedsPathUpdate() { m_needsPathUpdate = true; } | 45 void setNeedsPathUpdate() { m_needsPathUpdate = true; } |
(...skipping 15 matching lines...) Expand all Loading... |
62 | 61 |
63 virtual void layout(); | 62 virtual void layout(); |
64 virtual void paint(PaintInfo&, const LayoutPoint&); | 63 virtual void paint(PaintInfo&, const LayoutPoint&); |
65 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&); | 64 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&); |
66 | 65 |
67 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); | 66 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); |
68 | 67 |
69 FloatRect calculateMarkerBoundsIfNeeded(); | 68 FloatRect calculateMarkerBoundsIfNeeded(); |
70 void updateCachedBoundaries(); | 69 void updateCachedBoundaries(); |
71 | 70 |
72 void setupSquareCapPath(Path*& usePath, int& applyMode); | |
73 bool setupNonScalingStrokePath(Path*& usePath, GraphicsContextStateSaver&); | |
74 bool shouldStrokeZeroLengthSubpath() const; | |
75 FloatRect zeroLengthSubpathRect() const; | |
76 | |
77 private: | 71 private: |
78 virtual AffineTransform localTransform() const { return m_localTransform; } | 72 virtual AffineTransform localTransform() const { return m_localTransform; } |
79 void fillAndStrokePath(GraphicsContext*); | 73 void fillAndStrokePath(GraphicsContext*); |
80 | 74 |
81 bool m_needsBoundariesUpdate : 1; | 75 bool m_needsBoundariesUpdate : 1; |
82 bool m_needsPathUpdate : 1; | 76 bool m_needsPathUpdate : 1; |
83 bool m_needsTransformUpdate : 1; | 77 bool m_needsTransformUpdate : 1; |
84 | 78 |
85 mutable Path m_path; | 79 mutable Path m_path; |
86 FloatRect m_fillBoundingBox; | 80 FloatRect m_fillBoundingBox; |
(...skipping 15 matching lines...) Expand all Loading... |
102 return static_cast<const RenderSVGPath*>(object); | 96 return static_cast<const RenderSVGPath*>(object); |
103 } | 97 } |
104 | 98 |
105 // This will catch anyone doing an unnecessary cast. | 99 // This will catch anyone doing an unnecessary cast. |
106 void toRenderSVGPath(const RenderSVGPath*); | 100 void toRenderSVGPath(const RenderSVGPath*); |
107 | 101 |
108 } | 102 } |
109 | 103 |
110 #endif // ENABLE(SVG) | 104 #endif // ENABLE(SVG) |
111 #endif | 105 #endif |
OLD | NEW |