Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: gfx/canvas.h

Issue 2959014: Implement initial ClipRect.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gfx/canvas_direct2d.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include <string> 8 #include <string>
9 9
10 #include "gfx/native_widget_types.h" 10 #include "gfx/native_widget_types.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // at the specified alpha once Restore() is called. 74 // at the specified alpha once Restore() is called.
75 // |layer_bounds| are the bounds of the layer relative to the current 75 // |layer_bounds| are the bounds of the layer relative to the current
76 // transform. 76 // transform.
77 virtual void SaveLayerAlpha(uint8 alpha) = 0; 77 virtual void SaveLayerAlpha(uint8 alpha) = 0;
78 virtual void SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds) = 0; 78 virtual void SaveLayerAlpha(uint8 alpha, const gfx::Rect& layer_bounds) = 0;
79 79
80 // Restores the drawing state after a call to Save*(). It is an error to 80 // Restores the drawing state after a call to Save*(). It is an error to
81 // call Restore() more times than Save*(). 81 // call Restore() more times than Save*().
82 virtual void Restore() = 0; 82 virtual void Restore() = 0;
83 83
84 // Retrieves the clip rectangle and sets it in the specified rectangle if any.
85 // Returns true if the clip rect is non-empty.
86 virtual bool GetClipRect(gfx::Rect* clip_rect) = 0;
87
88 // Wrapper function that takes integer arguments. 84 // Wrapper function that takes integer arguments.
89 // Returns true if the clip is non-empty. 85 // Returns true if the clip is non-empty.
90 // See clipRect for specifics. 86 // See clipRect for specifics.
91 virtual bool ClipRectInt(int x, int y, int w, int h) = 0; 87 virtual bool ClipRectInt(int x, int y, int w, int h) = 0;
92 88
93 // Test whether the provided rectangle intersects the current clip rect.
94 virtual bool IntersectsClipRectInt(int x, int y, int w, int h) = 0;
95
96 // Wrapper function that takes integer arguments. 89 // Wrapper function that takes integer arguments.
97 // See translate() for specifics. 90 // See translate() for specifics.
98 virtual void TranslateInt(int x, int y) = 0; 91 virtual void TranslateInt(int x, int y) = 0;
99 92
100 // Wrapper function that takes integer arguments. 93 // Wrapper function that takes integer arguments.
101 // See scale() for specifics. 94 // See scale() for specifics.
102 virtual void ScaleInt(int x, int y) = 0; 95 virtual void ScaleInt(int x, int y) = 0;
103 96
104 // Fills the given rectangle with the given paint's parameters. 97 // Fills the given rectangle with the given paint's parameters.
105 virtual void FillRectInt(int x, int y, int w, int h, 98 virtual void FillRectInt(int x, int y, int w, int h,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Returns the rectangle that is invalid. 206 // Returns the rectangle that is invalid.
214 virtual gfx::Rect GetInvalidRect() const = 0; 207 virtual gfx::Rect GetInvalidRect() const = 0;
215 208
216 // Returns the underlying Canvas. 209 // Returns the underlying Canvas.
217 virtual Canvas* AsCanvas() = 0; 210 virtual Canvas* AsCanvas() = 0;
218 }; 211 };
219 212
220 } // namespace gfx; 213 } // namespace gfx;
221 214
222 #endif // GFX_CANVAS_H_ 215 #endif // GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | gfx/canvas_direct2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698