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

Unified Diff: ui/gfx/canvas.h

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review Created 9 years, 1 month 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
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 96159578e5150433ccc64d1e805cdf36327105c3..eb280a9582c039d28724b0d6dc2b63ad52fd245b 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -118,24 +118,22 @@ class UI_EXPORT Canvas {
// Fills the specified region with the specified brush.
virtual void FillRect(const gfx::Brush* brush, const gfx::Rect& rect) = 0;
+ // Draws the given rectangle with the given paint's parameters.
Peter Kasting 2011/11/21 19:26:03 Nit: I'd leave both the declaration and definition
tfarina 2011/11/22 18:39:01 Done.
+ virtual void DrawRect(const gfx::Rect& rect, const SkPaint& paint) = 0;
+
// Draws a single pixel rect in the specified region with the specified
// color, using a transfer mode of SkXfermode::kSrcOver_Mode.
//
// NOTE: if you need a single pixel line, use DrawLineInt.
- virtual void DrawRectInt(const SkColor& color,
- int x, int y, int w, int h) = 0;
+ virtual void DrawRect(const gfx::Rect& rect, const SkColor& color) = 0;
// Draws a single pixel rect in the specified region with the specified
// color and transfer mode.
//
// NOTE: if you need a single pixel line, use DrawLineInt.
- virtual void DrawRectInt(const SkColor& color,
- int x, int y, int w, int h,
- SkXfermode::Mode mode) = 0;
-
- // Draws the given rectangle with the given paint's parameters.
- virtual void DrawRectInt(int x, int y, int w, int h,
- const SkPaint& paint) = 0;
+ virtual void DrawRect(const gfx::Rect& rect,
+ const SkColor& color,
+ SkXfermode::Mode mode) = 0;
// Draws a single pixel line with the specified color.
virtual void DrawLineInt(const SkColor& color,

Powered by Google App Engine
This is Rietveld 408576698