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

Unified Diff: ui/gfx/transform.h

Issue 11418197: Move temporary MathUtil wrappers to permanent home in gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 52d15cfb22fe54a4208e76828df69ac2f0078e12..7d03d50ebc1d53b13f2fc13b5215ae8145a27b0c 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -35,7 +35,7 @@ class UI_EXPORT Transform {
// Applies the current transformation on an axis-angle rotation and assigns
// the result to |this|.
- void RotateAbout(const Vector3dF& point, double degree);
+ void RotateAbout(const Vector3dF& axis, double degree);
// Applies the current transformation on a scaling and assigns the result
// to |this|.
@@ -67,9 +67,23 @@ class UI_EXPORT Transform {
// Returns true if this is the identity matrix.
bool IsIdentity() const;
+ // Returns true if the matrix is either identity or pure translation.
+ bool IsIdentityOrTranslation() const;
+
+ // Returns true if the matrix is has only scaling and translation components.
+ bool IsScaleOrTranslation() const;
+
+ // Returns true if the matrix has any perspective component that would
+ // change the w-component of a homogeneous point.
+ bool HasPerspective() const;
+
// Returns true if this transform is non-singular.
bool IsInvertible() const;
+ // Returns true if a layer with a forward-facing normal of (0, 0, 1) would
+ // have its back side facing frontwards after applying the transform.
+ bool IsBackFaceVisible() const;
+
// Inverts the transform which is passed in. Returns true if successful.
bool GetInverse(Transform* transform) const WARN_UNUSED_RESULT;

Powered by Google App Engine
This is Rietveld 408576698