Page 1 of 1

Equivalent of Oval Graphic Angles?

Posted: Fri Mar 13, 2015 1:25 pm
by netdzynr
With oval graphics in LiveCode, we have startAngle and arcAngle properties. Are there equivalent properties in LC Builder?

Re: Equivalent of Oval Graphic Angles?

Posted: Fri Mar 13, 2015 1:37 pm
by LCMark
@netdzny: Yes!

Code: Select all

	// Create an elliptical arc path
	variable tPath
	put arc path centered at point [100,100] with radii [100,75] from 0 to 270 into tPath

	// Create a circular arc path
	variable tPath
	put arc path centered at point [100,100] with radius 100 from 0 to 270 into tPath

	// Create an elliptical sector path
	variable tPath
	put sector path centered at point [100,100] with radii [100,75] from 0 to 270 into tPath

	// Create a circular sector path
	variable tPath
	put sector path centered at point [100,100] with radius 100 from 0 to 270 into tPath

	// Create an elliptical segment path
	variable tPath
	put segment path centered at point [100,100] with radii [100,75] from 0 to 270 into tPath

	// Create a circular segment path
	variable tPath
	put segment path centered at point [100,100] with radius 100 from 0 to 270 into tPath
An 'arc' path is just the piece of the circle outline.

A 'sector' path is the 'arc' with the two end-points joined via the center point (i.e. piece of pie).

A 'segment' path is the 'arc' with the two end-points joined directly.

Note: We will also be adding 'arc to' path construction syntax - although this needs a bit more thought as to the best way to do it as partial elliptical arcs aren't the easiest thing to express in a path form (the SVG path parsing support does support the SVG arcto commands now though). The enhancement request for this is http://quality.runrev.com/show_bug.cgi?id=14896 - currently slated for DP2 but that is contingent on figuring out the syntax, and also whether anything higher priority crops up before then.