Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
LineCapMode
Line2D.swift:43enum LineCapMode
Cases
case none
Draws no line cap.
case box
Draws the line cap as a box, slightly extending the first/last segment.
case round
Draws the line cap as a semicircle attached to the first/last segment.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (23) members.
Types
Type members
Instance members
var antialiased: Bool
If
true
, the polyline’s border will be anti-aliased.var beginCapMode: Line2D.LineCapMode
The style of the beginning of the polyline, if
closed
isfalse
. UseLineCapMode
constants.var closed: Bool
If
true
and the polyline has more than 2 points, the last point and the first one will be connected by a segment.var defaultColor: Color
The color of the polyline. Will not be used if a gradient is set.
var endCapMode: Line2D.LineCapMode
The style of the end of the polyline, if
closed
isfalse
. UseLineCapMode
constants.var gradient: Gradient?
The gradient is drawn through the whole line from start to finish. The
defaultColor
will not be used if this property is set.var jointMode: Line2D.LineJointMode
The style of the connections between segments of the polyline. Use
LineJointMode
constants.var points: PackedVector2Array
The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array.
var roundPrecision: Int32
The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update.
var sharpLimit: Double
Determines the miter limit of the polyline. Normally, when
jointMode
is set to .lineJointSharp, sharp angles fall back to using the logic of .lineJointBevel joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles.var texture: Texture2D?
The texture used for the polyline. Uses
textureMode
for drawing style.var textureMode: Line2D.LineTextureMode
The style to render the
texture
of the polyline. UseLineTextureMode
constants.var width: Double
The polyline’s width.
var widthCurve: Curve?
The polyline’s width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain.
func addPoint(position: Vector2, index: Int32
) Adds a point with the specified
position
relative to the polyline’s own position. If noindex
is provided, the new point will be added to the end of the points array.func clearPoints(
) Removes all points from the polyline, making it empty.
func getPointCount(
) -> Int32 Returns the number of points in the polyline.
func getPointPosition(index: Int32
) -> Vector2 Returns the position of the point at index
index
.func removePoint(index: Int32
) Removes the point at index
index
from the polyline.func setPointPosition(index: Int32, position: Vector2
) Overwrites the position of the point at the given
index
with the suppliedposition
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.