Equivalent of Oval Graphic Angles?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
netdzynr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 62
Joined: Sat Apr 08, 2006 6:04 am
Contact:

Equivalent of Oval Graphic Angles?

Post by netdzynr » Fri Mar 13, 2015 1:25 pm

With oval graphics in LiveCode, we have startAngle and arcAngle properties. Are there equivalent properties in LC Builder?

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: Equivalent of Oval Graphic Angles?

Post by LCMark » Fri Mar 13, 2015 1:37 pm

@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.

Post Reply

Return to “LiveCode Builder”