From 792bbd14c63f217f2de0e6b2f8df99acb1928eea Mon Sep 17 00:00:00 2001 From: "mike@reedtribe.org" Date: Tue, 11 Jun 2013 02:20:28 +0000 Subject: add drawImage to lua git-svn-id: http://skia.googlecode.com/svn/trunk@9500 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleLua.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'samplecode/SampleLua.cpp') diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp index 104a427d7a..00a3227d48 100644 --- a/samplecode/SampleLua.cpp +++ b/samplecode/SampleLua.cpp @@ -27,6 +27,8 @@ static const char gCode[] = "" "local paint = Sk.newPaint();" "paint:setAntiAlias(true);" "" + "local image = Sk.loadImage('/skia/trunk/sailboat.jpg');" + "" "local color = {a = 1, r = 1, g = 0, b = 0};" "" "function rnd(range) " @@ -76,6 +78,7 @@ static const char gCode[] = "" " canvas:translate(x, 0);" " canvas:drawOval(r, paint) " " x = x + 1;" + " canvas:drawImage(image, x, r.bottom + 50, 0.5);" " if x > 100 then x = 0 end;" "end " "" -- cgit v1.2.3