Index: samplecode/SampleAll.cpp |
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp |
index b5a0fe568dcde2835e5473e1487e317c910ce24f..628504d90d9498f1e43d3b65f93df03850cb5fcf 100644 |
--- a/samplecode/SampleAll.cpp |
+++ b/samplecode/SampleAll.cpp |
@@ -440,10 +440,14 @@ |
canvas->drawPath(path, paint); |
paint.setShader(nullptr); |
- // bitmap |
+ // bitmap, sprite |
canvas->translate(SkIntToScalar(50), 0); |
paint.setStyle(SkPaint::kFill_Style); |
canvas->drawBitmap(fBug, left, top, &paint); |
+ canvas->translate(SkIntToScalar(30), 0); |
+ canvas->drawSprite(fTb, |
+ SkScalarRoundToInt(canvas->getTotalMatrix().getTranslateX()), |
+ spriteOffset + 10, &paint); |
canvas->translate(-SkIntToScalar(30), SkIntToScalar(30)); |
paint.setShader(shaderTest())->unref(); // test compose shader |