OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SVGShapePainter_h | 5 #ifndef SVGShapePainter_h |
6 #define SVGShapePainter_h | 6 #define SVGShapePainter_h |
7 | 7 |
| 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 |
| 10 class SkPaint; |
| 11 |
8 namespace blink { | 12 namespace blink { |
9 | 13 |
10 struct MarkerPosition; | 14 struct MarkerPosition; |
11 struct PaintInfo; | 15 struct PaintInfo; |
12 class FloatPoint; | 16 class FloatPoint; |
13 class GraphicsContext; | 17 class GraphicsContext; |
14 class Path; | |
15 class LayoutSVGResourceMarker; | 18 class LayoutSVGResourceMarker; |
16 class LayoutSVGShape; | 19 class LayoutSVGShape; |
17 | 20 |
18 class SVGShapePainter { | 21 class SVGShapePainter { |
19 public: | 22 public: |
20 SVGShapePainter(LayoutSVGShape& renderSVGShape) : m_renderSVGShape(renderSVG
Shape) { } | 23 SVGShapePainter(LayoutSVGShape& renderSVGShape) : m_renderSVGShape(renderSVG
Shape) { } |
21 | 24 |
22 void paint(const PaintInfo&); | 25 void paint(const PaintInfo&); |
23 | 26 |
24 private: | 27 private: |
25 void fillShape(GraphicsContext*); | 28 void fillShape(GraphicsContext*, const SkPaint&, SkPath::FillType); |
26 void strokeShape(GraphicsContext*); | 29 void strokeShape(GraphicsContext*, const SkPaint&); |
27 | 30 |
28 void paintMarkers(const PaintInfo&); | 31 void paintMarkers(const PaintInfo&); |
29 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos
ition&, float); | 32 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos
ition&, float); |
30 void strokeZeroLengthLineCaps(GraphicsContext*); | 33 void strokeZeroLengthLineCaps(GraphicsContext*, const SkPaint&); |
31 Path* zeroLengthLinecapPath(const FloatPoint&) const; | |
32 | 34 |
33 LayoutSVGShape& m_renderSVGShape; | 35 LayoutSVGShape& m_renderSVGShape; |
34 }; | 36 }; |
35 | 37 |
36 } // namespace blink | 38 } // namespace blink |
37 | 39 |
38 #endif // SVGShapePainter_h | 40 #endif // SVGShapePainter_h |
OLD | NEW |