 Chromium Code Reviews
 Chromium Code Reviews Issue 22330004:
  Add a map homogenous points to SkMatrix  (Closed) 
  Base URL: https://skia.googlecode.com/svn/trunk
    
  
    Issue 22330004:
  Add a map homogenous points to SkMatrix  (Closed) 
  Base URL: https://skia.googlecode.com/svn/trunk| Index: include/core/SkMatrix.h | 
| diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h | 
| index f148e390b5cd4930f2d985f61a286cda3748b7cc..f46aa2f65fa7149ed630d122d2b846d3604f94c7 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 points in src to read, and then transform | 
| 
reed1
2013/08/07 18:16:50
Lets be very clear what 'count' is measuring. Its
 | 
| + 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); | 
| @@ -666,6 +679,8 @@ private: | 
| int count); | 
| static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 
| + static void Homogeneous_pts(const SkMatrix&, SkScalar dst[], const SkScalar[], int); | 
| 
reed1
2013/08/07 18:16:50
Why is there a separate static function? Can just
 | 
| + | 
| static const MapPtsProc gMapPtsProcs[]; | 
| friend class SkPerspIter; |