Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: cypressx1 on July 08, 2011, 09:00:20 am
-
l'm learning lua now. l've learnt a lot such as on.timer(),class()...l found that lua is much much better than the Ti-Basic.but l still have plenty of questions ??? so where do we use the setPen ? and what can it do ? Can you give me some examples? Thanks a lot.. :)
-
How are you learning Lua?
Either way, here's how setPen() works:
gc:setPen(thickness, smoothness) : thickness {“thin”, “medium”, "thick"}, smoothness {“smooth”, "dotted", "dashed"}
You use it in the on.paint() function for example:
function on.paint(gc)
gc:setPen("thick", "dashed")
gc:drawRect(10, 10, 30, 30)
end
The rectangle at (10,10) is drawn with a thick and dashed line, try it :)
-
oh! l see
just like setFont ,Right?!
--[[l'm learning lua by reading Ti's examples,books about lua ,and ...oclua...Just again and again..]]
-
I highly recommend you to check wiki.inspired-lua.org and inspired-lua.org
Indeed, just like setFont()