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

Unified Diff: ui/gfx/transform.h

Issue 11275089: SkRect to gfx::Rect type conversions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/transform.h
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 4385c1c6fcf6f79a047325ac84f18b40cdcf6fb5..62efa6752d09a3bb6d3116dfbaaa30f9c60b2220 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -11,6 +11,7 @@
namespace gfx {
class Rect;
+class RectF;
class Point;
class Point3F;
@@ -102,13 +103,19 @@ class UI_EXPORT Transform {
// Applies transformation on the rectangle. Returns true if the transformed
// rectangle was axis aligned. If it returns false, rect will be the
// smallest axis aligned bounding box containing the transformed rect.
+ void TransformRect(RectF* rect) const;
danakj 2012/11/01 00:37:00 Why the transform changes in this CL? I think they
+
+ // Same as above, but expands to enclosing int rect.
danakj 2012/11/01 00:37:00 Not sure if implicit enclosing is great either. I
void TransformRect(Rect* rect) const;
// Applies the reverse transformation on the rectangle. Returns true if
// the transformed rectangle was axis aligned. If it returns false,
// rect will be the smallest axis aligned bounding box containing the
// transformed rect.
- bool TransformRectReverse(Rect* rect) const;
+ bool TransformRectReverse(RectF* rect) const;
+
+ // Same as above, but expands to enclosing int rect.
+ void TransformRectReverse(Rect* rect) const;
// Returns the underlying matrix.
const SkMatrix44& matrix() const { return matrix_; }

Powered by Google App Engine
This is Rietveld 408576698