Line2D

A 2D line.

A line through several points in 2D space.

@GodotBaseClass
struct Line2D {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
LineCapMode
enum LineCapMode
LineJointMode
enum LineJointMode
LineTextureMode
enum LineTextureMode

Functions

_gradientChanged
void _gradientChanged()
addPoint
void addPoint(Vector2 position)

Add a point at the position. Appends the point at the end of the line.

getBeginCapMode
Line2D.LineCapMode getBeginCapMode()
getDefaultColor
Color getDefaultColor()
getEndCapMode
Line2D.LineCapMode getEndCapMode()
getGradient
Ref!Gradient getGradient()
getJointMode
Line2D.LineJointMode getJointMode()
getPointCount
long getPointCount()

Returns the Line2D's amount of points.

getPointPosition
Vector2 getPointPosition(long i)

Returns point i's position.

getPoints
PoolVector2Array getPoints()
getRoundPrecision
long getRoundPrecision()
getSharpLimit
double getSharpLimit()
getTexture
Ref!Texture getTexture()
getTextureMode
Line2D.LineTextureMode getTextureMode()
getWidth
double getWidth()
opAssign
Line2D opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Line2D other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
removePoint
void removePoint(long i)

Remove the point at index i from the line.

setBeginCapMode
void setBeginCapMode(long mode)
setDefaultColor
void setDefaultColor(Color color)
setEndCapMode
void setEndCapMode(long mode)
setGradient
void setGradient(Gradient color)
setJointMode
void setJointMode(long mode)
setPointPosition
void setPointPosition(long i, Vector2 position)

Overwrites the position in point i with the supplied position.

setPoints
void setPoints(PoolVector2Array points)
setRoundPrecision
void setRoundPrecision(long precision)
setSharpLimit
void setSharpLimit(double limit)
setTexture
void setTexture(Texture texture)
setTextureMode
void setTextureMode(long mode)
setWidth
void setWidth(double width)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

beginCapMode
Line2D.LineCapMode beginCapMode [@property getter]
long beginCapMode [@property setter]

Controls the style of the line's first point. Use LINE_CAP_* constants. Default value: LINE_CAP_NONE.

defaultColor
Color defaultColor [@property getter]
Color defaultColor [@property setter]

The line's color. Will not be used if a gradient is set.

endCapMode
Line2D.LineCapMode endCapMode [@property getter]
long endCapMode [@property setter]

Controls the style of the line's last point. Use LINE_CAP_* constants. Default value: LINE_CAP_NONE.

gradient
Gradient gradient [@property getter]
Gradient gradient [@property setter]

The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set.

jointMode
Line2D.LineJointMode jointMode [@property getter]
long jointMode [@property setter]

The style for the points between the start and the end.

points
PoolVector2Array points [@property getter]
PoolVector2Array points [@property setter]

The points that form the lines. The line is drawn between every point set in this array.

roundPrecision
long roundPrecision [@property setter]

The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.

roundPrecision
long roundPrecision [@property getter]

The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.

sharpLimit
double sharpLimit [@property getter]
double sharpLimit [@property setter]

The direction difference in radians between vector points. This value is only used if joint mode is set to LINE_JOINT_SHARP.

texture
Texture texture [@property getter]
Texture texture [@property setter]

The texture used for the line's texture. Uses texture_mode for drawing style.

textureMode
Line2D.LineTextureMode textureMode [@property getter]
long textureMode [@property setter]

The style to render the texture on the line. Use LINE_TEXTURE_* constants. Default value: LINE_TEXTURE_NONE.

width
double width [@property getter]
double width [@property setter]

The line's width.

Static functions

_new
Line2D _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta