Class Primitive

    • Field Detail

      • PRIMITIVE_TYPE_RECTANGLE

        public static final int PRIMITIVE_TYPE_RECTANGLE
        See Also:
        Constant Field Values
      • PRIMITIVE_TYPE_REGULARPOLYGON

        public static final int PRIMITIVE_TYPE_REGULARPOLYGON
        See Also:
        Constant Field Values
      • PRIMITIVE_TYPE_TEXTUREDRECTANGLE

        public static final int PRIMITIVE_TYPE_TEXTUREDRECTANGLE
        See Also:
        Constant Field Values
      • PRIMITIVE_TYPE_TRIANGLE

        public static final int PRIMITIVE_TYPE_TRIANGLE
        See Also:
        Constant Field Values
      • enableDCPos

        protected boolean enableDCPos
        Enable DrawableCombiner position
      • enableDCSize

        protected boolean enableDCSize
        Enable DrawableCombiner position
      • enableDCRot

        protected boolean enableDCRot
        Enable DrawableCombiner position
      • color_

        protected java.lang.Object color_
        Color or Color binding of the primitive.
      • drawcondition

        protected IParsedExpression drawcondition
        The condition deciding if the drawable should be drawn.
      • renderinfos

        protected java.lang.Object[] renderinfos
        Cached render information
      • type

        protected int type
        Primitive type
      • halign

        protected int halign
        Horizontal alignment
      • valign

        protected int valign
        Vertical alignment
    • Constructor Detail

      • Primitive

        public Primitive()
      • 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)
        Initializes the drawable.
        Parameters:
        position - position or position-binding
        xrotation - xrotation or rotation-binding
        yrotation - yrotation or rotation-binding
        zrotation - zrotation or rotation-binding
        size - size or size-binding
        absFlags - flags for setting position, size and rotation as absolutes
        c - the drawable's color or color binding
    • Method Detail

      • getType

        public int getType()
        Get the primitive type.
        Returns:
        The type.
      • setType

        public void setType​(int type)
        Set the primitive type.
        Parameters:
        type - The type to set.
      • enableAbsolutePosition

        public void enableAbsolutePosition​(boolean enable)
        Enables using absolute positioning.
        Parameters:
        enable - true, to use the drawable's value as an absolute.
      • enableAbsoluteSize

        public void enableAbsoluteSize​(boolean enable)
        Enables using absolute scaling.
        Parameters:
        enable - true, to use the drawable's value as an absolute.
      • enableAbsoluteRotation

        public void enableAbsoluteRotation​(boolean enable)
        Enables using absolute rotation.
        Parameters:
        enable - true, to use the drawable's value as an absolute.
      • isRelativePosition

        public boolean isRelativePosition()
        Tests if primitive is using relative positioning.
        Returns:
        true, if the drawable's value is an absolute.
      • isRelativeSize

        public boolean isRelativeSize()
        Tests if primitive is using relative scaling.
        Returns:
        true, if the drawable's value is an absolute.
      • isRelativeRotation

        public boolean isRelativeRotation()
        Tests if primitive is using relative rotation.
        Returns:
        true, if the drawable's value is an absolute.
      • setDrawCondition

        public void setDrawCondition​(IParsedExpression drawcondition)
        Sets the draw condition.
        Parameters:
        drawcondition - the draw condition
      • getDrawCondition

        public IParsedExpression getDrawCondition()
        Gets the draw condition.
        Returns:
        the draw condition
      • getColor

        public java.lang.Object getColor()
        Gets the color or color binding of the drawable
        Returns:
        color or color binding of the drawable
      • setColor

        public void setColor​(java.lang.Object c)
        Sets a new color or binding for the drawable
        Parameters:
        c - new color or binding
      • getVAlign

        public int getVAlign()
        Gets the vertical alignment.
        Returns:
        The vertical alignment (top, middle, bottom).
      • setVAlign

        public void setVAlign​(int valign)
        Sets the vertical alignment.
        Parameters:
        valign - The vertical alignment (top, middle, bottom).
      • getHAlign

        public int getHAlign()
        Gets the horizontal alignment.
        Returns:
        The horizontal alignment (left, center, right).
      • setHAlign

        public void setHAlign​(int halign)
        Sets the horizontal alignment.
        Parameters:
        halign - The horizontal alignment (left, center, right).
      • getRenderInfo

        public java.lang.Object getRenderInfo​(int infoId)
        Returns cached render information.
        Parameters:
        infoId - id of the information
        Returns:
        render info
      • setRenderInfo

        public void setRenderInfo​(int infoId,
                                  java.lang.Object info)
        Sets cached render information.
        Parameters:
        infoId - id of the information
        info - the render info
      • flushRenderInfo

        public void flushRenderInfo()
        Flushes the render information.