| 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 void TileImageInt(const ImageSkia& image, | 382 void TileImageInt(const ImageSkia& image, |
| 383 int src_x, | 383 int src_x, |
| 384 int src_y, | 384 int src_y, |
| 385 float tile_scale_x, | 385 float tile_scale_x, |
| 386 float tile_scale_y, | 386 float tile_scale_y, |
| 387 int dest_x, | 387 int dest_x, |
| 388 int dest_y, | 388 int dest_y, |
| 389 int w, | 389 int w, |
| 390 int h); | 390 int h); |
| 391 | 391 |
| 392 // Returns a native drawing context for platform specific drawing routines to | |
| 393 // use. Must be balanced by a call to EndPlatformPaint(). | |
| 394 NativeDrawingContext BeginPlatformPaint(); | |
| 395 | |
| 396 // Signifies the end of platform drawing using the native drawing context | |
| 397 // returned by BeginPlatformPaint(). | |
| 398 void EndPlatformPaint(); | |
| 399 | |
| 400 // Apply transformation on the canvas. | 392 // Apply transformation on the canvas. |
| 401 void Transform(const Transform& transform); | 393 void Transform(const Transform& transform); |
| 402 | 394 |
| 403 // Draws the given string with a fade gradient at the end. | 395 // Draws the given string with a fade gradient at the end. |
| 404 void DrawFadedString(const base::string16& text, | 396 void DrawFadedString(const base::string16& text, |
| 405 const FontList& font_list, | 397 const FontList& font_list, |
| 406 SkColor color, | 398 SkColor color, |
| 407 const Rect& display_rect, | 399 const Rect& display_rect, |
| 408 int flags); | 400 int flags); |
| 409 | 401 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 440 | 432 |
| 441 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; | 433 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; |
| 442 SkCanvas* canvas_; | 434 SkCanvas* canvas_; |
| 443 | 435 |
| 444 DISALLOW_COPY_AND_ASSIGN(Canvas); | 436 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 445 }; | 437 }; |
| 446 | 438 |
| 447 } // namespace gfx | 439 } // namespace gfx |
| 448 | 440 |
| 449 #endif // UI_GFX_CANVAS_H_ | 441 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |