| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void DrawBitmapInt(const SkBitmap& bitmap, | 266 void DrawBitmapInt(const SkBitmap& bitmap, |
| 267 int src_x, int src_y, int src_w, int src_h, | 267 int src_x, int src_y, int src_w, int src_h, |
| 268 int dest_x, int dest_y, int dest_w, int dest_h, | 268 int dest_x, int dest_y, int dest_w, int dest_h, |
| 269 bool filter); | 269 bool filter); |
| 270 void DrawBitmapInt(const SkBitmap& bitmap, | 270 void DrawBitmapInt(const SkBitmap& bitmap, |
| 271 int src_x, int src_y, int src_w, int src_h, | 271 int src_x, int src_y, int src_w, int src_h, |
| 272 int dest_x, int dest_y, int dest_w, int dest_h, | 272 int dest_x, int dest_y, int dest_w, int dest_h, |
| 273 bool filter, | 273 bool filter, |
| 274 const SkPaint& paint); | 274 const SkPaint& paint); |
| 275 | 275 |
| 276 // TODO(pkotwicz): make this function private once gfx::ImageSkia stops |
| 277 // calling this method. |
| 278 void DrawBitmapFloat(const SkBitmap& bitmap, |
| 279 float src_x, float src_y, float src_w, float src_h, |
| 280 float dest_x, float dest_y, float dest_w, float dest_h, |
| 281 bool filter, |
| 282 const SkPaint& paint); |
| 283 |
| 276 // Draws text with the specified color, font and location. The text is | 284 // Draws text with the specified color, font and location. The text is |
| 277 // aligned to the left, vertically centered, clipped to the region. If the | 285 // aligned to the left, vertically centered, clipped to the region. If the |
| 278 // text is too big, it is truncated and '...' is added to the end. | 286 // text is too big, it is truncated and '...' is added to the end. |
| 279 void DrawStringInt(const string16& text, | 287 void DrawStringInt(const string16& text, |
| 280 const gfx::Font& font, | 288 const gfx::Font& font, |
| 281 SkColor color, | 289 SkColor color, |
| 282 int x, int y, int w, int h); | 290 int x, int y, int w, int h); |
| 283 void DrawStringInt(const string16& text, | 291 void DrawStringInt(const string16& text, |
| 284 const gfx::Font& font, | 292 const gfx::Font& font, |
| 285 SkColor color, | 293 SkColor color, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 367 |
| 360 scoped_ptr<skia::PlatformCanvas> owned_canvas_; | 368 scoped_ptr<skia::PlatformCanvas> owned_canvas_; |
| 361 SkCanvas* canvas_; | 369 SkCanvas* canvas_; |
| 362 | 370 |
| 363 DISALLOW_COPY_AND_ASSIGN(Canvas); | 371 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 364 }; | 372 }; |
| 365 | 373 |
| 366 } // namespace gfx | 374 } // namespace gfx |
| 367 | 375 |
| 368 #endif // UI_GFX_CANVAS_H_ | 376 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |