| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual void SaveLayerAlpha(uint8 alpha) = 0; | 95 virtual void SaveLayerAlpha(uint8 alpha) = 0; |
| 96 virtual void SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds) = 0; | 96 virtual void SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds) = 0; |
| 97 | 97 |
| 98 // Restores the drawing state after a call to Save*(). It is an error to | 98 // Restores the drawing state after a call to Save*(). It is an error to |
| 99 // call Restore() more times than Save*(). | 99 // call Restore() more times than Save*(). |
| 100 virtual void Restore() = 0; | 100 virtual void Restore() = 0; |
| 101 | 101 |
| 102 // Wrapper function that takes integer arguments. | 102 // Wrapper function that takes integer arguments. |
| 103 // Returns true if the clip is non-empty. | 103 // Returns true if the clip is non-empty. |
| 104 // See clipRect for specifics. | 104 // See clipRect for specifics. |
| 105 virtual bool ClipRectInt(int x, int y, int w, int h) = 0; | 105 virtual bool ClipRectInt(const gfx::Rect& rect) = 0; |
| 106 | 106 |
| 107 // Wrapper function that takes integer arguments. | 107 // Wrapper function that takes integer arguments. |
| 108 // See translate() for specifics. | 108 // See translate() for specifics. |
| 109 virtual void TranslateInt(int x, int y) = 0; | 109 virtual void TranslateInt(int x, int y) = 0; |
| 110 | 110 |
| 111 // Wrapper function that takes integer arguments. | 111 // Wrapper function that takes integer arguments. |
| 112 // See scale() for specifics. | 112 // See scale() for specifics. |
| 113 virtual void ScaleInt(int x, int y) = 0; | 113 virtual void ScaleInt(int x, int y) = 0; |
| 114 | 114 |
| 115 // Fills the specified region with the specified color using a transfer | 115 // Fills the specified region with the specified color using a transfer |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // Returns the rectangle that is invalid. | 253 // Returns the rectangle that is invalid. |
| 254 virtual gfx::Rect GetInvalidRect() const = 0; | 254 virtual gfx::Rect GetInvalidRect() const = 0; |
| 255 | 255 |
| 256 // Returns the underlying Canvas. | 256 // Returns the underlying Canvas. |
| 257 virtual Canvas* AsCanvas() = 0; | 257 virtual Canvas* AsCanvas() = 0; |
| 258 }; | 258 }; |
| 259 | 259 |
| 260 } // namespace gfx; | 260 } // namespace gfx; |
| 261 | 261 |
| 262 #endif // UI_GFX_CANVAS_H_ | 262 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |