aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPoint.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-12 14:59:34 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-12 14:59:34 +0000
commitdbeeac33329f5fd7dbd3514cd7189ca6ed080476 (patch)
tree1c1a3d931392cc1a138b17ceb28eec000ecb966f /include/core/SkPoint.h
parent27c9b6d27681dd54b82137b1e67140470b868f07 (diff)
Add perspective support to the gpu aa hairline renderer.
Review URL: http://codereview.appspot.com/4969071/ git-svn-id: http://skia.googlecode.com/svn/trunk@2249 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPoint.h')
-rw-r--r--include/core/SkPoint.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 8ba2cbcaa6..fedc404a33 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -189,6 +189,16 @@ struct SK_API SkPoint {
}
void setRectFan(SkScalar l, SkScalar t, SkScalar r, SkScalar b, size_t stride);
+ static void Offset(SkPoint points[], int count, const SkPoint& offset) {
+ Offset(points, count, offset.fX, offset.fY);
+ }
+
+ static void Offset(SkPoint points[], int count, SkScalar dx, SkScalar dy) {
+ for (int i = 0; i < count; ++i) {
+ points[i].offset(dx, dy);
+ }
+ }
+
void offset(SkScalar dx, SkScalar dy) {
fX += dx;
fY += dy;