class
Line2d (client-side)
Deprecated since version: 0.1.10
Note
This class has been deprecated. Use Line instead.
This class represents 2d line visible on the screen.
Constructor
Line2d(int x1, int y1, int x2, int y2)
Parameters:
int
x1: the beginning x position of the line in virtuals.int
y1: the beginning y position of the line in virtuals.int
x2: the end x position of the line in virtuals.int
y2: the end y position of the line in virtuals.
Properties
bool
visible
Deprecated since version: 0.1.10
Represents the visibility state of the line.
Methods
top
Deprecated since version: 0.1.10
This method will move the line at the end of the render queue.
It will be visible at the top of the screen (other elements will be covered by it).
void top()
setBegin
Deprecated since version: 0.1.10
This method will set the beginning point of the line.
void setBegin(int x, int y)
Parameters:
int
x: the x position in virtuals.int
y: the y position in virtuals.
setEnd
Deprecated since version: 0.1.10
This method will set the end point of the line.
void setEnd(int x, int y)
Parameters:
int
x: the x position in virtuals.int
y: the y position in virtuals.
setColor
Deprecated since version: 0.1.10
This method will set the line color.
void setColor(int r, int g, int b)
Parameters:
int
r: the red color component in RGB model.int
g: the green color component in RGB model.int
b: the blue color component in RGB model.
getBegin
Deprecated since version: 0.1.10
This method will get the position of the beginning point of the line.
{ x, y } getBegin()
Returns { x, y }
:
the beginning position of the line on screen in virtuals.
getEnd
Deprecated since version: 0.1.10
This method will get the position of the end point of the line.
{ x, y } getEnd()
Returns { x, y }
:
the end position of the line on screen in virtuals.
getColor
Deprecated since version: 0.1.10
This method will get the line color.
{r, g, b} getColor()
Returns {r, g, b}
:
the line color.