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 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
8 * Copyright (C) 2011 University of Szeged | 8 * Copyright (C) 2011 University of Szeged |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 Path& path() const | 59 Path& path() const |
60 { | 60 { |
61 ASSERT(m_path); | 61 ASSERT(m_path); |
62 return *m_path; | 62 return *m_path; |
63 } | 63 } |
64 bool hasPath() const { return m_path.get(); } | 64 bool hasPath() const { return m_path.get(); } |
65 | 65 |
66 virtual bool isShapeEmpty() const { return path().isEmpty(); } | 66 virtual bool isShapeEmpty() const { return path().isEmpty(); } |
67 | 67 |
68 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override f
inal { return m_paintInvalidationBoundingBox; } | |
69 | |
70 bool hasNonScalingStroke() const { return style()->svgStyle().vectorEffect()
== VE_NON_SCALING_STROKE; } | 68 bool hasNonScalingStroke() const { return style()->svgStyle().vectorEffect()
== VE_NON_SCALING_STROKE; } |
71 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const; | 69 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const; |
72 AffineTransform nonScalingStrokeTransform() const; | 70 AffineTransform nonScalingStrokeTransform() const; |
73 virtual AffineTransform localTransform() const override final { return m_loc
alTransform ? *m_localTransform : RenderSVGModelObject::localTransform(); } | 71 virtual AffineTransform localTransform() const override final { return m_loc
alTransform ? *m_localTransform : RenderSVGModelObject::localTransform(); } |
74 | 72 |
75 virtual const Vector<MarkerPosition>* markerPositions() const { return 0; } | 73 virtual const Vector<MarkerPosition>* markerPositions() const { return 0; } |
76 | 74 |
77 float strokeWidth() const; | 75 float strokeWidth() const; |
78 | 76 |
79 virtual ShapeGeometryCodePath geometryCodePath() const { return PathGeometry
; } | 77 virtual ShapeGeometryCodePath geometryCodePath() const { return PathGeometry
; } |
(...skipping 29 matching lines...) Expand all Loading... |
109 | 107 |
110 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) override final; | 108 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction) override final; |
111 | 109 |
112 virtual FloatRect strokeBoundingBox() const override final { return m_stroke
BoundingBox; } | 110 virtual FloatRect strokeBoundingBox() const override final { return m_stroke
BoundingBox; } |
113 FloatRect calculateObjectBoundingBox() const; | 111 FloatRect calculateObjectBoundingBox() const; |
114 FloatRect calculateStrokeBoundingBox() const; | 112 FloatRect calculateStrokeBoundingBox() const; |
115 void updatePaintInvalidationBoundingBox(); | 113 void updatePaintInvalidationBoundingBox(); |
116 void updateLocalTransform(); | 114 void updateLocalTransform(); |
117 | 115 |
118 private: | 116 private: |
119 FloatRect m_paintInvalidationBoundingBox; | |
120 OwnPtr<AffineTransform> m_localTransform; | 117 OwnPtr<AffineTransform> m_localTransform; |
121 OwnPtr<Path> m_path; | 118 OwnPtr<Path> m_path; |
122 | 119 |
123 bool m_needsBoundariesUpdate : 1; | 120 bool m_needsBoundariesUpdate : 1; |
124 bool m_needsShapeUpdate : 1; | 121 bool m_needsShapeUpdate : 1; |
125 bool m_needsTransformUpdate : 1; | 122 bool m_needsTransformUpdate : 1; |
126 }; | 123 }; |
127 | 124 |
128 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); | 125 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); |
129 | 126 |
130 } | 127 } |
131 | 128 |
132 #endif | 129 #endif |
OLD | NEW |