| 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" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 | 9 |
| 10 class SkPaint; | 10 class SkPaint; |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class FloatRect; |
| 14 struct MarkerPosition; | 15 struct MarkerPosition; |
| 15 struct PaintInfo; | 16 struct PaintInfo; |
| 16 class FloatPoint; | 17 class FloatPoint; |
| 17 class GraphicsContext; | 18 class GraphicsContext; |
| 18 class LayoutSVGResourceMarker; | 19 class LayoutSVGResourceMarker; |
| 19 class LayoutSVGShape; | 20 class LayoutSVGShape; |
| 20 | 21 |
| 21 class SVGShapePainter { | 22 class SVGShapePainter { |
| 22 public: | 23 public: |
| 23 SVGShapePainter(LayoutSVGShape& layoutSVGShape) : m_layoutSVGShape(layoutSVG
Shape) { } | 24 SVGShapePainter(LayoutSVGShape& layoutSVGShape) : m_layoutSVGShape(layoutSVG
Shape) { } |
| 24 | 25 |
| 25 void paint(const PaintInfo&); | 26 void paint(const PaintInfo&); |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 void fillShape(GraphicsContext*, const SkPaint&, SkPath::FillType); | 29 void fillShape(GraphicsContext*, const SkPaint&, SkPath::FillType); |
| 29 void strokeShape(GraphicsContext*, const SkPaint&); | 30 void strokeShape(GraphicsContext*, const SkPaint&); |
| 30 | 31 |
| 31 void paintMarkers(const PaintInfo&); | 32 void paintMarkers(const PaintInfo&, const FloatRect& boundingBox); |
| 32 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos
ition&, float); | 33 void paintMarker(const PaintInfo&, LayoutSVGResourceMarker&, const MarkerPos
ition&, float); |
| 33 void strokeZeroLengthLineCaps(GraphicsContext*, const SkPaint&); | 34 void strokeZeroLengthLineCaps(GraphicsContext*, const SkPaint&); |
| 34 | 35 |
| 35 LayoutSVGShape& m_layoutSVGShape; | 36 LayoutSVGShape& m_layoutSVGShape; |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 } // namespace blink | 39 } // namespace blink |
| 39 | 40 |
| 40 #endif // SVGShapePainter_h | 41 #endif // SVGShapePainter_h |
| OLD | NEW |