Index: include/core/SkMatrix.h |
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h |
index f148e390b5cd4930f2d985f61a286cda3748b7cc..432670eae3c5d6f5ce6d9b4d9e94b72bc820daa1 100644 |
--- a/include/core/SkMatrix.h |
+++ b/include/core/SkMatrix.h |
@@ -423,6 +423,19 @@ public: |
} |
} |
+ /** Apply this matrix to the array of homogenous points, specified by src, |
+ where a homogenous 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 points in src to read, and then transform |
+ into dst. |
+ */ |
+ void mapHomogenousPoints(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); |
@@ -666,6 +679,8 @@ private: |
int count); |
static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
+ static void Homogenous_pts(const SkMatrix&, SkScalar dst[], const SkScalar[], int); |
+ |
static const MapPtsProc gMapPtsProcs[]; |
friend class SkPerspIter; |