| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 const Font& font, | 402 const Font& font, |
| 403 SkColor color, | 403 SkColor color, |
| 404 const Rect& text_bounds, | 404 const Rect& text_bounds, |
| 405 int line_height, | 405 int line_height, |
| 406 int flags, | 406 int flags, |
| 407 const ShadowValues& shadows); | 407 const ShadowValues& shadows); |
| 408 | 408 |
| 409 // Draws a dotted gray rectangle used for focus purposes. | 409 // Draws a dotted gray rectangle used for focus purposes. |
| 410 void DrawFocusRect(const Rect& rect); | 410 void DrawFocusRect(const Rect& rect); |
| 411 | 411 |
| 412 // Draws a |rect| in the specified region with the specified |color| with a |
| 413 // with of one logical pixel which might be more device pixels. |
| 414 void DrawSolidFocusRect(const Rect& rect, SkColor color); |
| 415 |
| 412 // Tiles the image in the specified region. | 416 // Tiles the image in the specified region. |
| 413 // Parameters are specified relative to current canvas scale not in pixels. | 417 // Parameters are specified relative to current canvas scale not in pixels. |
| 414 // Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1. | 418 // Thus, |x| is 2 pixels if canvas scale = 2 & |x| = 1. |
| 415 void TileImageInt(const ImageSkia& image, | 419 void TileImageInt(const ImageSkia& image, |
| 416 int x, | 420 int x, |
| 417 int y, | 421 int y, |
| 418 int w, | 422 int w, |
| 419 int h); | 423 int h); |
| 420 void TileImageInt(const ImageSkia& image, | 424 void TileImageInt(const ImageSkia& image, |
| 421 int src_x, | 425 int src_x, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 493 |
| 490 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; | 494 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; |
| 491 SkCanvas* canvas_; | 495 SkCanvas* canvas_; |
| 492 | 496 |
| 493 DISALLOW_COPY_AND_ASSIGN(Canvas); | 497 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 494 }; | 498 }; |
| 495 | 499 |
| 496 } // namespace gfx | 500 } // namespace gfx |
| 497 | 501 |
| 498 #endif // UI_GFX_CANVAS_H_ | 502 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |