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

Side by Side Diff: ui/gfx/canvas.h

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura_shell/toplevel_frame_view.cc ('k') | ui/gfx/canvas_direct2d.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_GFX_CANVAS_H_ 5 #ifndef UI_GFX_CANVAS_H_
6 #define UI_GFX_CANVAS_H_ 6 #define UI_GFX_CANVAS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Returns true if the clip is non-empty. 101 // Returns true if the clip is non-empty.
102 virtual bool ClipRect(const gfx::Rect& rect) = 0; 102 virtual bool ClipRect(const gfx::Rect& rect) = 0;
103 103
104 virtual void Translate(const gfx::Point& point) = 0; 104 virtual void Translate(const gfx::Point& point) = 0;
105 105
106 virtual void Scale(int x_scale, int y_scale) = 0; 106 virtual void Scale(int x_scale, int y_scale) = 0;
107 107
108 // Fills the specified region with the specified color using a transfer 108 // Fills the specified region with the specified color using a transfer
109 // mode of SkXfermode::kSrcOver_Mode. 109 // mode of SkXfermode::kSrcOver_Mode.
110 virtual void FillRectInt(const SkColor& color, 110 virtual void FillRect(const SkColor& color, const gfx::Rect& rect) = 0;
111 int x, int y, int w, int h) = 0;
112 111
113 // Fills the specified region with the specified color and mode 112 // Fills the specified region with the specified color and mode.
114 virtual void FillRectInt(const SkColor& color, 113 virtual void FillRect(const SkColor& color,
115 int x, int y, int w, int h, 114 const gfx::Rect& rect,
116 SkXfermode::Mode mode) = 0; 115 SkXfermode::Mode mode) = 0;
117 116
118 // Fills the specified region with the specified brush. 117 // Fills the specified region with the specified brush.
119 virtual void FillRectInt(const gfx::Brush* brush, 118 virtual void FillRect(const gfx::Brush* brush, const gfx::Rect& rect) = 0;
120 int x, int y, int w, int h) = 0;
121 119
122 // Draws a single pixel rect in the specified region with the specified 120 // Draws a single pixel rect in the specified region with the specified
123 // color, using a transfer mode of SkXfermode::kSrcOver_Mode. 121 // color, using a transfer mode of SkXfermode::kSrcOver_Mode.
124 // 122 //
125 // NOTE: if you need a single pixel line, use DrawLineInt. 123 // NOTE: if you need a single pixel line, use DrawLineInt.
126 virtual void DrawRectInt(const SkColor& color, 124 virtual void DrawRectInt(const SkColor& color,
127 int x, int y, int w, int h) = 0; 125 int x, int y, int w, int h) = 0;
128 126
129 // Draws a single pixel rect in the specified region with the specified 127 // Draws a single pixel rect in the specified region with the specified
130 // color and transfer mode. 128 // color and transfer mode.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // Returns the rectangle that is invalid. 244 // Returns the rectangle that is invalid.
247 virtual gfx::Rect GetInvalidRect() const = 0; 245 virtual gfx::Rect GetInvalidRect() const = 0;
248 246
249 // Returns the underlying Canvas. 247 // Returns the underlying Canvas.
250 virtual Canvas* AsCanvas() = 0; 248 virtual Canvas* AsCanvas() = 0;
251 }; 249 };
252 250
253 } // namespace gfx 251 } // namespace gfx
254 252
255 #endif // UI_GFX_CANVAS_H_ 253 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/toplevel_frame_view.cc ('k') | ui/gfx/canvas_direct2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698