Struct for a drawable 2D line segment, holding endpoint coordinates and corresponding opacity
Constructor
new(_x1:Float, _y1:Float, _x2:Float, _y2:Float)
New line segment from endpoints
Parameters:
_x1 | x coorinate of first endpoint |
---|---|
_y1 | y coorinate of first endpoint |
_x2 | x coorinate of second endpoint |
_y2 | y coorinate of second endpoint |
Variables
Methods
flip():Void
Flip direction of the line segment, making the first endpoint the second, and the second the first
setOpacity(o1:Float, o2:Float):Void
Set opacity at each end
Parameters:
o1 | opacity at first endpoint |
---|---|
o2 | opacity at second endpoint |