A 2D line. A line through several points in 2D space. Supports varying width and color over the line's length, texturing, and several cap/joint types. [b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb]. https://godotengine.org/asset-library/asset/584 https://godotengine.org/asset-library/asset/583 Adds a point with the specified [code]position[/code] relative to the line's own position. Appends the new point at the end of the point list. If [code]index[/code] is given, the new point is inserted before the existing point identified by index [code]index[/code]. Every existing point starting from [code]index[/code] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count]. Removes all points from the line. Returns the amount of points in the line. Returns the position of the point at index [code]index[/code]. Removes the point at index [code]index[/code] from the line. Overwrites the position of the point at index [code]index[/code] with the supplied [code]position[/code]. If [code]true[/code], the line's border will attempt to perform antialiasing by drawing thin OpenGL smooth lines on the line's edges. [b]Note:[/b] Line2D is not accelerated by batching if [member antialiased] is [code]true[/code]. [b]Note:[/b] Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [url=https://github.com/godot-extended-libraries/godot-antialiased-line2d]Antialiased Line2D[/url] add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines. Controls the style of the line's first point. Use [enum LineCapMode] constants. The line's color. Will not be used if a gradient is set. Controls the style of the line's last point. Use [enum LineCapMode] constants. The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. The style for the points between the start and the end. The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors. The smoothness of the rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. This is only used if a cap or joint is set as round. [b]Note:[/b] The default value is tuned for lines with the default [member width]. For thin lines, this value should be reduced to a number between [code]2[/code] and [code]4[/code] to improve performance. The direction difference in radians between vector points. This value is only used if [member joint_mode] is set to [constant LINE_JOINT_SHARP]. The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants. The line's width. The line's width varies with the curve. The original width is simply multiply by the value of the Curve. The line's joints will be pointy. If [code]sharp_limit[/code] is greater than the rotation of a joint, it becomes a bevel joint instead. The line's joints will be bevelled/chamfered. The line's joints will be rounded. Don't draw a line cap. Draws the line cap as a box. Draws the line cap as a circle. Takes the left pixels of the texture and renders it over the whole line. Tiles the texture over the line. The texture must be imported with [b]Repeat[/b] enabled for it to work properly. Stretches the texture across the line. Import the texture with [b]Repeat[/b] disabled for best results.