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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 virtual void TranslateInt(int x, int y) = 0; | 94 virtual void TranslateInt(int x, int y) = 0; |
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 // Fills the specified region with the specified color and mode | |
brettw
2010/11/08 21:44:06
Can you put a blank line above this?
Alex Nicolaou
2010/11/12 04:05:00
Done, but that's not the way overloads are done el
| |
105 virtual void FillRectInt(const SkColor& color, | |
106 int x, int y, int w, int h, | |
107 SkXfermode::Mode mode) = 0; | |
104 | 108 |
105 // Fills the specified region with the specified brush. | 109 // Fills the specified region with the specified brush. |
106 virtual void FillRectInt(const gfx::Brush* brush, | 110 virtual void FillRectInt(const gfx::Brush* brush, |
107 int x, int y, int w, int h) = 0; | 111 int x, int y, int w, int h) = 0; |
108 | 112 |
109 // Draws a single pixel rect in the specified region with the specified | 113 // Draws a single pixel rect in the specified region with the specified |
110 // color, using a transfer mode of SkXfermode::kSrcOver_Mode. | 114 // color, using a transfer mode of SkXfermode::kSrcOver_Mode. |
111 // | 115 // |
112 // NOTE: if you need a single pixel line, use DrawLineInt. | 116 // NOTE: if you need a single pixel line, use DrawLineInt. |
113 virtual void DrawRectInt(const SkColor& color, | 117 virtual void DrawRectInt(const SkColor& color, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 // Returns the rectangle that is invalid. | 227 // Returns the rectangle that is invalid. |
224 virtual gfx::Rect GetInvalidRect() const = 0; | 228 virtual gfx::Rect GetInvalidRect() const = 0; |
225 | 229 |
226 // Returns the underlying Canvas. | 230 // Returns the underlying Canvas. |
227 virtual Canvas* AsCanvas() = 0; | 231 virtual Canvas* AsCanvas() = 0; |
228 }; | 232 }; |
229 | 233 |
230 } // namespace gfx; | 234 } // namespace gfx; |
231 | 235 |
232 #endif // GFX_CANVAS_H_ | 236 #endif // GFX_CANVAS_H_ |
OLD | NEW |