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