Hi, is there any code can draw lines in corona sdk?
using coordinates like (x1,y1,x2,y2)?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
display.newLine?
Not through the SDK directly (I think someone from Ansca said it was being worked on for a future version... boy it sure would be nice to see a roadmap split up by projected releases and projected timeframes! :) ), but garysims posted some code which should do the trick (no idea on performance):
http://developer.anscamobile.com/forum/2010/02/19/bresenhams-line-algorithm
Scott
You can use display.newRect(x, y, 1, ySize) for a a vertical line. Just used this in one of my projects, it's basically a rectangle with one dimension stripped down to 1.
workaround for x1,y1,x2,y2 is here
Hello,
I need to create a polylines object which is closed and filled with a color. An object like a silhouette.
Any idea for a workaround?
See the bezier sample code I just posted ... we have had a new display.newLIne feature for sometime.
C.
Thank you Carlos. Sounds good. I'll give it a try.
:)
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
Accelerometer Error
Slow down animation with a button press
onComplete Firing Immediately
Android Fragmentation Feedback
spritegrabber show function
TestFlightApp, unable to download error and Entitlements.plist
Problem:Touched Icon above Touched Object
My program crash on Android build
openfeint issues