Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1159)

Unified Diff: Source/core/paint/ObjectPainter.h

Issue 591613003: Move painting code from RenderObject into a new ObjectPainter class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge again. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/ObjectPainter.h
diff --git a/Source/core/paint/ObjectPainter.h b/Source/core/paint/ObjectPainter.h
new file mode 100644
index 0000000000000000000000000000000000000000..a4dc4a0e61a790a7891724e474f7faad3f860608
--- /dev/null
+++ b/Source/core/paint/ObjectPainter.h
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ObjectPainter_h
+#define ObjectPainter_h
+
+#include "core/rendering/style/RenderStyleConstants.h"
+
+namespace blink {
+
+class Color;
+class GraphicsContext;
+class LayoutPoint;
+class LayoutRect;
+struct PaintInfo;
+class RenderObject;
+class RenderStyle;
+
+class ObjectPainter {
+public:
+ ObjectPainter(RenderObject& renderObject) : m_renderObject(renderObject) { }
+
+ void paintOutline(PaintInfo&, const LayoutRect& paintRect);
+ void paintFocusRing(PaintInfo&, const LayoutPoint& paintOffset, RenderStyle*);
+
+ static void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
+ static void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
+ BoxSide, Color, int thickness, EBorderStyle, bool antialias);
+ static void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
+ int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjacentWidth2, bool antialias);
+ static void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
+ BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bool antialias);
+ static void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
+ BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias);
+private:
+
+ RenderObject& m_renderObject;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/ObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698