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

Unified Diff: include/core/SkMatrix.h

Issue 298473002: Add function to get both min and max scale factors from matrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove newline Created 6 years, 7 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
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkMatrix.h
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index d52ab67f8c968896af88abd163356d232ed364f5..a594dac7551276f94302e1b9b85707b2be6e44f0 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -579,6 +579,13 @@ public:
SkScalar getMaxScale() const;
/**
+ * Gets both the min and max scale factors. The min scale factor is scaleFactors[0] and the max
+ * is scaleFactors[1]. If the matrix has perspective -1 will be returned and scaleFactors will
reed1 2014/05/20 15:17:55 -1 --> false
bsalomon 2014/05/20 15:32:42 Done.
+ * be unchanged.
+ */
+ bool getScaleFactors(SkScalar scaleFactors[2]) const;
reed1 2014/05/20 15:17:55 1. do we need this entrypoint and the other two? 2
bsalomon 2014/05/20 15:32:42 Most call sites only require 1 of the 2 and comput
+
+ /**
* Return a reference to a const identity matrix
*/
static const SkMatrix& I();
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698