I need to be able to draw a single line. Then from time to time I need to change it's length and position. Is this possible with gideros? I have been looking through the docs of gideros and I found a shape class, but it doesn't seem to do what I want. I couldn't find any tutorials on this either. Any help would be appreciated
Comments
After that either scale it (bad idea), or clear it and draw the shape again (good idea)
Shape API is quite straight forward. begin drawing using beginPath method, end drawing using endPath method. use moveTo for first point, and then lineTo for other points.
If you need only one line, then set line width, and color using setLineStyle method.
Clear shape to draw again, using clear method. That's it
local line = DrawLine(x,y,width, color)
It would be nice to have a simplified class for this, though I suppose I could just create a function to do it (maybe)
Better wrap it up your self in a function
www.tntengine.com
It would be great to use SVG since then I can scale the graphics at run-time and not have to deal with multiple graphic sizes.