| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 GFX_CANVAS_H_ | 5 #ifndef GFX_CANVAS_H_ |
| 6 #define GFX_CANVAS_H_ | 6 #define GFX_CANVAS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // Wrapper function that takes integer arguments. | 96 // Wrapper function that takes integer arguments. |
| 97 // See scale() for specifics. | 97 // See scale() for specifics. |
| 98 virtual void ScaleInt(int x, int y) = 0; | 98 virtual void ScaleInt(int x, int y) = 0; |
| 99 | 99 |
| 100 // Fills the specified region with the specified color using a transfer | 100 // Fills the specified region with the specified color using a transfer |
| 101 // mode of SkXfermode::kSrcOver_Mode. | 101 // mode of SkXfermode::kSrcOver_Mode. |
| 102 virtual void FillRectInt(const SkColor& color, | 102 virtual void FillRectInt(const SkColor& color, |
| 103 int x, int y, int w, int h) = 0; | 103 int x, int y, int w, int h) = 0; |
| 104 | 104 |
| 105 // Fills the specified region with the specified color and mode |
| 106 virtual void FillRectInt(const SkColor& color, |
| 107 int x, int y, int w, int h, |
| 108 SkXfermode::Mode mode) = 0; |
| 109 |
| 105 // Fills the specified region with the specified brush. | 110 // Fills the specified region with the specified brush. |
| 106 virtual void FillRectInt(const gfx::Brush* brush, | 111 virtual void FillRectInt(const gfx::Brush* brush, |
| 107 int x, int y, int w, int h) = 0; | 112 int x, int y, int w, int h) = 0; |
| 108 | 113 |
| 109 // Draws a single pixel rect in the specified region with the specified | 114 // Draws a single pixel rect in the specified region with the specified |
| 110 // color, using a transfer mode of SkXfermode::kSrcOver_Mode. | 115 // color, using a transfer mode of SkXfermode::kSrcOver_Mode. |
| 111 // | 116 // |
| 112 // NOTE: if you need a single pixel line, use DrawLineInt. | 117 // NOTE: if you need a single pixel line, use DrawLineInt. |
| 113 virtual void DrawRectInt(const SkColor& color, | 118 virtual void DrawRectInt(const SkColor& color, |
| 114 int x, int y, int w, int h) = 0; | 119 int x, int y, int w, int h) = 0; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Returns the rectangle that is invalid. | 228 // Returns the rectangle that is invalid. |
| 224 virtual gfx::Rect GetInvalidRect() const = 0; | 229 virtual gfx::Rect GetInvalidRect() const = 0; |
| 225 | 230 |
| 226 // Returns the underlying Canvas. | 231 // Returns the underlying Canvas. |
| 227 virtual Canvas* AsCanvas() = 0; | 232 virtual Canvas* AsCanvas() = 0; |
| 228 }; | 233 }; |
| 229 | 234 |
| 230 } // namespace gfx; | 235 } // namespace gfx; |
| 231 | 236 |
| 232 #endif // GFX_CANVAS_H_ | 237 #endif // GFX_CANVAS_H_ |
| OLD | NEW |