localfunction newCircle(x, y, r, steps, color)localsin, cos, d2r =math.sin, math.cos, math.pi/180
color = color or 0x4488cc
local c = Shape.new()
c:setFillStyle(Shape.SOLID, color)
c:setLineStyle(0)
c:beginPath()
c:moveTo(r *sin(0* d2r), r *cos(0* d2r))for i =0, 360, 360/ steps do
c:lineTo(r *sin(i * d2r), r *cos(i * d2r))end
c:endPath()
c:setPosition(x, y)return c
endlocal c = newCircle(200, 100, 100, 70)
stage:addChild(c)
Comments
http://docs.giderosmobile.com/reference/gideros/Path2D#Path2D
Likes: Ninjadoodle
Fragmenter - animated loop machine and IKONOMIKON - the memory game
"M 50 10 A 40 40 0 1 0 50 90 A 40 40 0 1 0 50 10 Z M 50 30 A 20 20 0 1 1 50 70 A 20 20 0 1 1 50 30 Z"
Likes: Ninjadoodle
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Thank you heaps for the link! I've had a play around with the code ... and I think I will just use a png lol.
I'll come back to it later and try and understand it a bit better
Thanks again!
Likes: Ninjadoodle
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: Ninjadoodle
Thanks heaps for that, it works perfectly
Likes: antix