| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool filter) = 0; | 171 bool filter) = 0; |
| 172 virtual void DrawBitmapInt(const SkBitmap& bitmap, | 172 virtual void DrawBitmapInt(const SkBitmap& bitmap, |
| 173 int src_x, int src_y, int src_w, int src_h, | 173 int src_x, int src_y, int src_w, int src_h, |
| 174 int dest_x, int dest_y, int dest_w, int dest_h, | 174 int dest_x, int dest_y, int dest_w, int dest_h, |
| 175 bool filter, | 175 bool filter, |
| 176 const SkPaint& paint) = 0; | 176 const SkPaint& paint) = 0; |
| 177 | 177 |
| 178 // Draws text with the specified color, font and location. The text is | 178 // Draws text with the specified color, font and location. The text is |
| 179 // aligned to the left, vertically centered, clipped to the region. If the | 179 // aligned to the left, vertically centered, clipped to the region. If the |
| 180 // text is too big, it is truncated and '...' is added to the end. | 180 // text is too big, it is truncated and '...' is added to the end. |
| 181 virtual void DrawStringInt(const string16& text, | 181 virtual void DrawStringInt(const string16& text, const |
| 182 const gfx::Font& font, | 182 gfx::Font& font, |
| 183 const SkColor& color, | 183 const SkColor& color, |
| 184 int x, int y, int w, int h) = 0; | 184 int x, int y, int w, int h) = 0; |
| 185 virtual void DrawStringInt(const string16& text, | 185 virtual void DrawStringInt(const string16& text, |
| 186 const gfx::Font& font, | 186 const gfx::Font& font, |
| 187 const SkColor& color, | 187 const SkColor& color, |
| 188 const gfx::Rect& display_rect) = 0; | 188 const gfx::Rect& display_rect) = 0; |
| 189 | 189 |
| 190 // Draws text with the specified color, font and location. The last argument | 190 // Draws text with the specified color, font and location. The last argument |
| 191 // specifies flags for how the text should be rendered. It can be one of | 191 // specifies flags for how the text should be rendered. It can be one of |
| 192 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. | 192 // TEXT_ALIGN_CENTER, TEXT_ALIGN_RIGHT or TEXT_ALIGN_LEFT. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // Returns the rectangle that is invalid. | 241 // Returns the rectangle that is invalid. |
| 242 virtual gfx::Rect GetInvalidRect() const = 0; | 242 virtual gfx::Rect GetInvalidRect() const = 0; |
| 243 | 243 |
| 244 // Returns the underlying Canvas. | 244 // Returns the underlying Canvas. |
| 245 virtual Canvas* AsCanvas() = 0; | 245 virtual Canvas* AsCanvas() = 0; |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 } // namespace gfx; | 248 } // namespace gfx; |
| 249 | 249 |
| 250 #endif // UI_GFX_CANVAS_H_ | 250 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |