public class Primitive extends AbstractVisual2D
| Modifier and Type | Field and Description |
|---|---|
static int |
ABSOLUTE_POSITION |
static int |
ABSOLUTE_ROTATION |
static int |
ABSOLUTE_SIZE |
static int |
PRIMITIVE_TYPE_ELLIPSE |
static int |
PRIMITIVE_TYPE_RECTANGLE |
static int |
PRIMITIVE_TYPE_REGULARPOLYGON |
static int |
PRIMITIVE_TYPE_TEXT |
static int |
PRIMITIVE_TYPE_TEXTUREDRECTANGLE |
static int |
PRIMITIVE_TYPE_TRIANGLE |
| Constructor and Description |
|---|
Primitive() |
Primitive(int type,
Object position,
Object rotation,
Object size,
int absFlags,
Object c,
IParsedExpression drawcondition)
Initializes the drawable.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enableAbsolutePosition(boolean enable)
Enables using absolute positioning.
|
void |
enableAbsoluteRotation(boolean enable)
Enables using absolute rotation.
|
void |
enableAbsoluteSize(boolean enable)
Enables using absolute scaling.
|
void |
flushRenderInfo()
Flushes the render information.
|
Object |
getColor()
Gets the color or color binding of the drawable
|
IParsedExpression |
getDrawCondition()
Gets the draw condition.
|
Object |
getRenderInfo(int infoId)
Returns cached render information.
|
int |
getType()
Get the primitive type.
|
boolean |
isRelativePosition()
Tests if primitive is using relative positioning.
|
boolean |
isRelativeRotation()
Tests if primitive is using relative rotation.
|
boolean |
isRelativeSize()
Tests if primitive is using relative scaling.
|
void |
setColor(Object c)
Sets a new color or binding for the drawable
|
void |
setDrawCondition(IParsedExpression drawcondition)
Sets the draw condition.
|
void |
setRenderInfo(int infoId,
Object info)
Sets cached render information.
|
void |
setType(int type)
Set the primitive type.
|
bindPosition, bindRotation, bindSize, getPosition, getRotation, getSize, setPosition, setRotation, setSizepublic static final int ABSOLUTE_POSITION
public static final int ABSOLUTE_SIZE
public static final int ABSOLUTE_ROTATION
public static final int PRIMITIVE_TYPE_ELLIPSE
public static final int PRIMITIVE_TYPE_RECTANGLE
public static final int PRIMITIVE_TYPE_REGULARPOLYGON
public static final int PRIMITIVE_TYPE_TEXT
public static final int PRIMITIVE_TYPE_TEXTUREDRECTANGLE
public static final int PRIMITIVE_TYPE_TRIANGLE
public Primitive()
public Primitive(int type,
Object position,
Object rotation,
Object size,
int absFlags,
Object c,
IParsedExpression drawcondition)
position - position or position-bindingxrotation - xrotation or rotation-bindingyrotation - yrotation or rotation-bindingzrotation - zrotation or rotation-bindingsize - size or size-bindingabsFlags - flags for setting position, size and rotation as absolutesc - the drawable's color or color bindingpublic int getType()
public void setType(int type)
type - The type to set.public void enableAbsolutePosition(boolean enable)
enable - true, to use the drawable's value as an absolute.public void enableAbsoluteSize(boolean enable)
enable - true, to use the drawable's value as an absolute.public void enableAbsoluteRotation(boolean enable)
enable - true, to use the drawable's value as an absolute.public boolean isRelativePosition()
public boolean isRelativeSize()
public boolean isRelativeRotation()
public void setDrawCondition(IParsedExpression drawcondition)
drawcondition - the draw conditionpublic IParsedExpression getDrawCondition()
public Object getColor()
public void setColor(Object c)
c - new color or bindingpublic Object getRenderInfo(int infoId)
infoId - id of the informationpublic void setRenderInfo(int infoId,
Object info)
infoId - id of the informationinfo - the render infopublic void flushRenderInfo()
Copyright © 2012. All Rights Reserved.