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 | 
ALIGN_BOTTOM
Bottom Alignment 
 | 
static int | 
ALIGN_CENTER
Center Alignment 
 | 
static int | 
ALIGN_LEFT
Left Alignment 
 | 
static int | 
ALIGN_MIDDLE
Middle Alignment 
 | 
static int | 
ALIGN_RIGHT
Right Alignment 
 | 
static int | 
ALIGN_TOP
Top Alignment 
 | 
protected java.lang.Object | 
color_
Color or Color binding of the primitive. 
 | 
protected IParsedExpression | 
drawcondition
The condition deciding if the drawable should be drawn. 
 | 
protected boolean | 
enableDCPos
Enable DrawableCombiner position 
 | 
protected boolean | 
enableDCRot
Enable DrawableCombiner position 
 | 
protected boolean | 
enableDCSize
Enable DrawableCombiner position 
 | 
protected int | 
halign
Horizontal alignment 
 | 
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  | 
protected java.lang.Object[] | 
renderinfos
Cached render information 
 | 
protected int | 
type
Primitive type 
 | 
protected int | 
valign
Vertical alignment 
 | 
| Constructor and Description | 
|---|
Primitive()  | 
Primitive(int type,
         java.lang.Object position,
         java.lang.Object rotation,
         java.lang.Object size,
         int absFlags,
         java.lang.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. 
 | 
java.lang.Object | 
getColor()
Gets the color or color binding of the drawable 
 | 
IParsedExpression | 
getDrawCondition()
Gets the draw condition. 
 | 
int | 
getHAlign()
Gets the horizontal alignment. 
 | 
java.lang.Object | 
getRenderInfo(int infoId)
Returns cached render information. 
 | 
int | 
getType()
Get the primitive type. 
 | 
int | 
getVAlign()
Gets the vertical alignment. 
 | 
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(java.lang.Object c)
Sets a new color or binding for the drawable 
 | 
void | 
setDrawCondition(IParsedExpression drawcondition)
Sets the draw condition. 
 | 
void | 
setHAlign(int halign)
Sets the horizontal alignment. 
 | 
void | 
setRenderInfo(int infoId,
             java.lang.Object info)
Sets cached render information. 
 | 
void | 
setType(int type)
Set the primitive type. 
 | 
void | 
setVAlign(int valign)
Sets the vertical alignment. 
 | 
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 static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final int ALIGN_TOP
public static final int ALIGN_MIDDLE
public static final int ALIGN_BOTTOM
protected boolean enableDCPos
protected boolean enableDCSize
protected boolean enableDCRot
protected java.lang.Object color_
protected IParsedExpression drawcondition
protected java.lang.Object[] renderinfos
protected int type
protected int halign
protected int valign
public Primitive()
public Primitive(int type,
                 java.lang.Object position,
                 java.lang.Object rotation,
                 java.lang.Object size,
                 int absFlags,
                 java.lang.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 java.lang.Object getColor()
public void setColor(java.lang.Object c)
c - new color or bindingpublic int getVAlign()
public void setVAlign(int valign)
valign - The vertical alignment (top, middle, bottom).public int getHAlign()
public void setHAlign(int halign)
halign - The horizontal alignment (left, center, right).public java.lang.Object getRenderInfo(int infoId)
infoId - id of the informationpublic void setRenderInfo(int infoId,
                          java.lang.Object info)
infoId - id of the informationinfo - the render infopublic void flushRenderInfo()