aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleHairCurves.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-07 18:42:30 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-09-07 18:42:30 +0000
commit181e9bd9484ece4132e0cc5cfcff602134e5489d (patch)
treeb71db20ecb2d0338aeff1d71ae0c143349165776 /samplecode/SampleHairCurves.cpp
parenta5adf5385dc6958bda4dad47f59c1c45bd98c627 (diff)
Improve gpu path subdiv with perspective, remove tolerance scale, fix comment
Review URL: http://codereview.appspot.com/4993041/ git-svn-id: http://skia.googlecode.com/svn/trunk@2239 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleHairCurves.cpp')
-rw-r--r--samplecode/SampleHairCurves.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/samplecode/SampleHairCurves.cpp b/samplecode/SampleHairCurves.cpp
index 152cbeb09c..a3ea5e103d 100644
--- a/samplecode/SampleHairCurves.cpp
+++ b/samplecode/SampleHairCurves.cpp
@@ -28,6 +28,11 @@ protected:
virtual void onDrawContent(SkCanvas* canvas) {
+ SkMatrix m;
+ m.reset();
+ m.setPerspX(0.00020);
+ canvas->concat(m);
+
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
@@ -38,6 +43,7 @@ protected:
SkPath curves;
SkPath hulls;
SkPath ctrlPts;
+
for (int i = 0; i < 100; ++i) {
SkScalar pts[] = {
rand.nextUScalar1(), rand.nextUScalar1(),