OLD | NEW |
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // Draws text with the specified color, font and location. The last argument | 198 // Draws text with the specified color, font and location. The last argument |
199 // specifies flags for how the text should be rendered. It can be one of | 199 // specifies flags for how the text should be rendered. It can be one of |
200 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. | 200 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. |
201 virtual void DrawStringInt(const string16& text, | 201 virtual void DrawStringInt(const string16& text, |
202 const gfx::Font& font, | 202 const gfx::Font& font, |
203 const SkColor& color, | 203 const SkColor& color, |
204 int x, int y, int w, int h, | 204 int x, int y, int w, int h, |
205 int flags) = 0; | 205 int flags) = 0; |
206 | 206 |
207 // Draws a dotted gray rectangle used for focus purposes. | 207 // Draws a dotted gray rectangle used for focus purposes. |
208 virtual void DrawFocusRect(int x, int y, int width, int height) = 0; | 208 virtual void DrawFocusRect(const gfx::Rect& rect) = 0; |
209 | 209 |
210 // Tiles the image in the specified region. | 210 // Tiles the image in the specified region. |
211 virtual void TileImageInt(const SkBitmap& bitmap, | 211 virtual void TileImageInt(const SkBitmap& bitmap, |
212 int x, int y, int w, int h) = 0; | 212 int x, int y, int w, int h) = 0; |
213 virtual void TileImageInt(const SkBitmap& bitmap, | 213 virtual void TileImageInt(const SkBitmap& bitmap, |
214 int src_x, int src_y, | 214 int src_x, int src_y, |
215 int dest_x, int dest_y, int w, int h) = 0; | 215 int dest_x, int dest_y, int w, int h) = 0; |
216 | 216 |
217 // Returns a native drawing context for platform specific drawing routines to | 217 // Returns a native drawing context for platform specific drawing routines to |
218 // use. Must be balanced by a call to EndPlatformPaint(). | 218 // use. Must be balanced by a call to EndPlatformPaint(). |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // Returns the rectangle that is invalid. | 253 // Returns the rectangle that is invalid. |
254 virtual gfx::Rect GetInvalidRect() const = 0; | 254 virtual gfx::Rect GetInvalidRect() const = 0; |
255 | 255 |
256 // Returns the underlying Canvas. | 256 // Returns the underlying Canvas. |
257 virtual Canvas* AsCanvas() = 0; | 257 virtual Canvas* AsCanvas() = 0; |
258 }; | 258 }; |
259 | 259 |
260 } // namespace gfx; | 260 } // namespace gfx; |
261 | 261 |
262 #endif // UI_GFX_CANVAS_H_ | 262 #endif // UI_GFX_CANVAS_H_ |
OLD | NEW |