Drag[en]gine Script Module DragonScript Script API  1.0
Canvas Class Reference

Canvas. More...

Inheritance diagram for Canvas:
CanvasCanvasView CanvasImage CanvasPaint CanvasRenderWorld CanvasText CanvasVideoPlayer CanvasView

Public Member Functions

Management
Point getPosition ()
 Position in parent canvas view units. More...
 
void setPosition (Point position)
 Set position in parent canvas view units. More...
 
Point getSize ()
 Size in parent canvas view units. More...
 
void setSize (Point size)
 Set size in parent canvas view units. More...
 
TexMatrix2 getTransform ()
 Transformation matrix affecting the canvas and all its content. More...
 
void setTransform (TexMatrix2 transform)
 Set transformation matrix affecting the canvas and all its content. More...
 
ColorMatrix getColorTransform ()
 Color transformation matrix affecting the canvas and all its content. More...
 
void setColorTransform (ColorMatrix transform)
 Set color transformation matrix affecting the canvas and all its content. More...
 
bool getVisible ()
 Canvas is visible. More...
 
void setVisible (bool visible)
 Set if canvas is visible. More...
 
float getOrder ()
 Render order. Larger renders ontop of smaller. More...
 
void setOrder (float order)
 Set render order. Larger renders ontop of smaller. More...
 
float getTransparency ()
 Transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent. More...
 
void setTransparency (float transparency)
 Set transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent. More...
 
int getBlendMode ()
 Blend mode used to blend canvas over previous content. More...
 
void setBlendMode (int blendMode)
 Set blend mode used to blend canvas over previous content. More...
 
bool equals (Object other)
 Canvas is equal to another object. More...
 
int hashCode ()
 Hash code for use as dictionary keys. More...
 

Static Public Attributes

Blend modes.
static final int BLEND = 0
 Blend canvas over previous content. More...
 
static final int ADD = 1
 Add canvas over previous content. More...
 

Protected Member Functions

Constructors
Canvas new ()
 Create canvas. More...
 

Detailed Description

Canvas.

This is a native class. It can not be instanced directly.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

Canvas is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type canvas and components are equal.

§ getBlendMode()

int getBlendMode ( )

Blend mode used to blend canvas over previous content.

§ getColorTransform()

ColorMatrix getColorTransform ( )

Color transformation matrix affecting the canvas and all its content.

§ getOrder()

float getOrder ( )

Render order. Larger renders ontop of smaller.

§ getPosition()

Point getPosition ( )

Position in parent canvas view units.

§ getSize()

Point getSize ( )

Size in parent canvas view units.

§ getTransform()

TexMatrix2 getTransform ( )

Transformation matrix affecting the canvas and all its content.

§ getTransparency()

float getTransparency ( )

Transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent.

§ getVisible()

bool getVisible ( )

Canvas is visible.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ new()

Canvas new ( )
protected

Create canvas.

§ setBlendMode()

void setBlendMode ( int  blendMode)

Set blend mode used to blend canvas over previous content.

§ setColorTransform()

void setColorTransform ( ColorMatrix  transform)

Set color transformation matrix affecting the canvas and all its content.

§ setOrder()

void setOrder ( float  order)

Set render order. Larger renders ontop of smaller.

§ setPosition()

void setPosition ( Point  position)

Set position in parent canvas view units.

§ setSize()

void setSize ( Point  size)

Set size in parent canvas view units.

§ setTransform()

void setTransform ( TexMatrix2  transform)

Set transformation matrix affecting the canvas and all its content.

§ setTransparency()

void setTransparency ( float  transparency)

Set transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent.

§ setVisible()

void setVisible ( bool  visible)

Set if canvas is visible.

Member Data Documentation

§ ADD

final int ADD = 1
static

Add canvas over previous content.

Pixel color is oldColor + newColor * transparency.

§ BLEND

final int BLEND = 0
static

Blend canvas over previous content.

Pixel color is oldColor * (1-transparency) + newColor * transparency. This is the default blend mode.


The documentation for this class was generated from the following file: