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

Unified Diff: include/core/SkMatrix.h

Issue 22330004: Add a map homogenous points to SkMatrix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 f148e390b5cd4930f2d985f61a286cda3748b7cc..387fa82fedb80b7c92242651131ced03b7b717fa 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -423,6 +423,19 @@ public:
}
}
+ /** Apply this matrix to the array of homogeneous points, specified by src,
+ where a homogeneous point is defined by 3 contiguous scalar values,
+ and write the transformed points into the array of scalars specified by dst.
+ dst[] = M * src[]
+ @param dst Where the transformed coordinates are written. It must
+ contain at least 3 * count entries
+ @param src The original coordinates that are to be transformed. It
+ must contain at least 3 * count entries
+ @param count The number of triples (homogeneous points) in src to read,
+ and then transform into dst.
+ */
+ void mapHomogeneousPoints(SkScalar dst[], const SkScalar src[], int count) const;
+
void mapXY(SkScalar x, SkScalar y, SkPoint* result) const {
SkASSERT(result);
this->getMapXYProc()(*this, x, y, result);
« 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