diff options
author | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-08 03:15:47 +0000 |
---|---|---|
committer | mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-06-08 03:15:47 +0000 |
commit | e6469f10c8f9340032797316fd06ee2f109255ff (patch) | |
tree | 9f49c210af272eaab3c987f029d216372e0c9f13 /samplecode/SampleLua.cpp | |
parent | 99ac02bb701c1e30b20f2174aac25ffbe487c0af (diff) |
add drawtext to lua
git-svn-id: http://skia.googlecode.com/svn/trunk@9477 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleLua.cpp')
-rw-r--r-- | samplecode/SampleLua.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp index 1ad89f9d54..fb40087a12 100644 --- a/samplecode/SampleLua.cpp +++ b/samplecode/SampleLua.cpp @@ -49,6 +49,11 @@ static const char gCode[] = "" " path:quadTo(rndX(), rndY(), rndX(), rndY());" " end " " canvas:drawPath(path, path_paint);" + "" + " paint:setTypeface(Sk.newTypeface('Times', 1));" + " paint:setColor{a = 1, r=0, g=0, b = 1};" + " paint:setTextSize(70);" + " canvas:drawText('Hamburgefons', 50, 200, paint);" "end " "" "function onDrawContent(canvas) " |