Class Line
java.lang.Object
- All Implemented Interfaces:
Mask
Represents a line segment from (x,y) to (x2,y2) in world units. This Shape does not have a fill.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.BlendableEntity
BlendableEntity.BlendMode
-
Method Summary
Modifier and TypeMethodDescriptionint
getX2()
Returns the X coordinate of thisLine
's end point.int
getY2()
Returns the Y coordinate of thisLine
's end point.setX2
(int x2) Sets the X coordinate of the end point of thisLine
.Sets the X coordinate of the end point of thisLine
.setY2
(int y2) Sets the y coordinate of the end point of thisLine
.Sets the y coordinate of the end point of thisLine
.Methods inherited from class com.codingame.gameengine.module.entities.Shape
getFillAlpha, getFillColor, getLineAlpha, getLineColor, getLineWidth, setFillAlpha, setFillAlpha, setFillColor, setFillColor, setLineAlpha, setLineAlpha, setLineColor, setLineColor, setLineWidth, setLineWidth
Methods inherited from class com.codingame.gameengine.module.entities.BlendableEntity
getBlendMode, setBlendMode
Methods inherited from class com.codingame.gameengine.module.entities.Entity
getAlpha, getId, getMask, getParent, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, getX, getY, getZIndex, isVisible, requireValidAlpha, requireValidColor, self, set, set, setAlpha, setAlpha, setMask, setMask, setRotation, setRotation, setScale, setScale, setScaleX, setScaleX, setScaleY, setScaleY, setSkewX, setSkewX, setSkewY, setSkewY, setVisible, setX, setX, setY, setY, setZIndex
-
Method Details
-
setX2
Sets the X coordinate of the end point of thisLine
.The starting point of this line is its position.
- Parameters:
x2
- the X coordinate for the end point of thisLine
.- Returns:
- this
Line
.
-
setX2
Sets the X coordinate of the end point of thisLine
.The starting point of this line is its position.
- Parameters:
x2
- the X coordinate for the end point of thisLine
.curve
- the transition to animate between values of this property.- Returns:
- this
Line
.
-
getX2
public int getX2()Returns the X coordinate of thisLine
's end point.- Returns:
- the X coordinate of this
Line
's end point.
-
setY2
Sets the y coordinate of the end point of thisLine
.The starting point of this line is its position.
- Parameters:
y2
- the Y coordinate for the end point of thisLine
.- Returns:
- this
Line
.
-
setY2
Sets the y coordinate of the end point of thisLine
.The starting point of this line is its position.
- Parameters:
y2
- the Y coordinate for the end point of thisLine
.curve
- the transition to animate between values of this property.- Returns:
- this
Line
.
-
getY2
public int getY2()Returns the Y coordinate of thisLine
's end point.- Returns:
- the Y coordinate of this
Line
's end point.
-