Layout

Ashley's avatar
Medal
Construct Team Founder
Published 16 May, 2018
137 words
<1 min

The Layout class represents a layout in the runtime.

Methods

GetRuntime()

Return the Runtime for this layout.

GetName()

Return a string of the name of the layout.

SetScrollX(x)

SetScrollY(y)

GetScrollX()

GetScrollY()

Set and get the scroll position in layout co-ordinates.

SetScale(s)

GetScale()

Set and get the layout scale as a multiplier. Note that the layout scale affects all layers.

SetAngle(a)

GetAngle()

Set and get the layout angle in radians. Note that the layout angle affects all layers. Use C3.toDegrees() and C3.toRadians() to convert from degrees to radians.

GetWidth()

GetHeight()

Get the size of the layout.

GetLayerCount()

Return the number of Layers on this layout.

GetLayer(p)

GetLayerByIndex(i)

GetLayerByName(name)

Get a Layer on the layout either by its zero-based index or a case-insensitive string of its name. The GetLayer() method accepts either an index or a name.