Index: samplecode/SamplePatch.cpp |
diff --git a/samplecode/SamplePatch.cpp b/samplecode/SamplePatch.cpp |
index 5f39eda37acc7a53ea2b29a880b31e89a81ac9b6..88bd06f7f0f10e4993e9f69b247cc508b5f9bed5 100644 |
--- a/samplecode/SamplePatch.cpp |
+++ b/samplecode/SamplePatch.cpp |
@@ -296,8 +296,23 @@ protected: |
paint.setAntiAlias(false); |
paint.setShader(fShader1); |
+ { |
+ SkMatrix m; |
+ m.setSkew(1, 0); |
+ SkShader* s = SkShader::CreateLocalMatrixShader(paint.getShader(), m); |
+ paint.setShader(s)->unref(); |
+ } |
+ { |
+ static int gAngle; |
+ SkMatrix m; |
+ m.setRotate(SkIntToScalar(gAngle++)); |
+ SkShader* s = SkShader::CreateLocalMatrixShader(paint.getShader(), m); |
+ paint.setShader(s)->unref(); |
+ } |
patch.setBounds(fSize1.fX, fSize1.fY); |
drawpatches(canvas, paint, 10, 10, &patch); |
+ |
+ this->inval(NULL); |
} |
class PtClick : public Click { |