Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / paint / SVGShapePainter.h
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
3 // found in the LICENSE file.
4
5 #ifndef SVGShapePainter_h
6 #define SVGShapePainter_h
7
8 namespace blink {
9
10 struct MarkerPosition;
11 struct PaintInfo;
12 class FloatPoint;
13 class GraphicsContext;
14 class Path;
15 class RenderSVGResourceMarker;
16 class RenderSVGShape;
17
18 class SVGShapePainter {
19 public:
20     SVGShapePainter(RenderSVGShape& renderSVGShape) : m_renderSVGShape(renderSVGShape) { }
21
22     void paint(PaintInfo&);
23
24 private:
25     void fillShape(GraphicsContext*);
26     void strokeShape(GraphicsContext*);
27
28     void paintMarkers(PaintInfo&);
29     void paintMarker(PaintInfo&, RenderSVGResourceMarker&, const MarkerPosition&, float);
30     void strokeZeroLengthLineCaps(GraphicsContext*);
31     Path* zeroLengthLinecapPath(const FloatPoint&) const;
32
33     RenderSVGShape& m_renderSVGShape;
34 };
35
36 } // namespace blink
37
38 #endif // SVGShapePainter_h