-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Terry Cavanagh edited this page Feb 28, 2018
·
6 revisions
To install the Layers plugin, download this Layers.hx file, and copy it into your own project's plugins folder.
See the examples folder for examples.
- "screen": A special pre-defined layer for the screen.
- Layer.create: Create a new layer.
- Layer.attach: Attach a layer to the canvas.
-
Layer.attached: Returns
true
if the named layer is currently attached to the canvas. - Layer.detach: Remove a layer from the canvas.
- Layer.drawto: Draw to the named layer.
- Layer.getlayers: Returns a list of all currently attached layers.
- Layer.move: Move a layer to a new position.
- Layer.getx: Get the x position of a layer.
- Layer.gety: Get the y position of a layer.
- Layer.rotate: Rotates a layer, in degrees.
- Layer.getrotation: Get the rotation of a layer (in degrees).
- Layer.alpha: Set the alpha of a layer.
- Layer.getalpha: Get the alpha of a layer.
- Layer.scale: Scales a layer.
- Layer.scalex: Scales a layer horizontally only.
- Layer.scaley: Scales a layer vertically only.
- Layer.scalexy: Scales a layer horizontally and vertically.
- Layer.getscale: Get the scale of a layer.
- Layer.getscalex: Get the horizontal scale of a layer only.
- Layer.getscaley: Get the vertical scale of a layer only.
- Layer.height: Get the height of a layer.
- Layer.heightmid: Get half the height of a layer.
- Layer.width: Get the width of a layer.
- Layer.widthmid: Get half the width of a layer.
- Layer.enable: Manually enable the Layers plugin.
See the sidebar for the full list of functions.