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 ObjectPainter_h | 5 #ifndef ObjectPainter_h |
6 #define ObjectPainter_h | 6 #define ObjectPainter_h |
7 | 7 |
8 #include "core/rendering/style/RenderStyleConstants.h" | 8 #include "core/rendering/style/RenderStyleConstants.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 class Color; | 12 class Color; |
13 class GraphicsContext; | 13 class GraphicsContext; |
14 class LayoutPoint; | 14 class LayoutPoint; |
15 class LayoutRect; | 15 class LayoutRect; |
16 struct PaintInfo; | 16 struct PaintInfo; |
17 class RenderObject; | 17 class RenderObject; |
18 class RenderStyle; | 18 class RenderStyle; |
19 | 19 |
20 class ObjectPainter { | 20 class ObjectPainter { |
21 public: | 21 public: |
22 ObjectPainter(RenderObject& renderObject) : m_renderObject(renderObject) { } | 22 ObjectPainter(RenderObject& renderObject) : m_renderObject(renderObject) { } |
23 | 23 |
24 void paintOutline(const PaintInfo&, const LayoutRect& paintRect); | 24 void paintOutline(const PaintInfo&, const LayoutRect& paintRect); |
25 void paintFocusRing(const PaintInfo&, const LayoutPoint& paintOffset, Render
Style*); | 25 void paintFocusRing(const PaintInfo&, const LayoutPoint& paintOffset, Render
Style*); |
26 | 26 |
27 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); | 27 static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = fals
e); |
| 28 private: |
28 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int
x2, int y2, | 29 static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int
x2, int y2, |
29 BoxSide, Color, int thickness, EBorderStyle, bool antialias); | 30 BoxSide, Color, int thickness, EBorderStyle, bool antialias); |
30 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, | 31 static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int
y2, |
31 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); | 32 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac
entWidth2, bool antialias); |
32 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x
2, int y2, | 33 static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x
2, int y2, |
33 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); | 34 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); |
34 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y
2, | 35 static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y
2, |
35 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); | 36 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); |
36 private: | |
37 | 37 |
38 RenderObject& m_renderObject; | 38 RenderObject& m_renderObject; |
39 }; | 39 }; |
40 | 40 |
41 } // namespace blink | 41 } // namespace blink |
42 | 42 |
43 #endif | 43 #endif |
OLD | NEW |