Documentation
¶
Overview ¶
Package Polygon2D provides methods for working with Polygon2D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AddBone(path string, weights []float32)
- func (self Instance) Antialiased() bool
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPolygon2D() Instance
- func (self Instance) ClearBones()
- func (self Instance) Color() Color.RGBA
- func (self Instance) EraseBone(index int)
- func (self Instance) GetBoneCount() int
- func (self Instance) GetBonePath(index int) string
- func (self Instance) GetBoneWeights(index int) []float32
- func (self Instance) InternalVertexCount() int
- func (self Instance) InvertBorder() Float.X
- func (self Instance) InvertEnabled() bool
- func (self Instance) Offset() Vector2.XY
- func (self Instance) Polygon() []Vector2.XY
- func (self Instance) Polygons() []any
- func (self Instance) SetAntialiased(value bool)
- func (self Instance) SetBonePath(index int, path string)
- func (self Instance) SetBoneWeights(index int, weights []float32)
- func (self Instance) SetColor(value Color.RGBA)
- func (self Instance) SetInternalVertexCount(value int)
- func (self Instance) SetInvertBorder(value Float.X)
- func (self Instance) SetInvertEnabled(value bool)
- func (self Instance) SetOffset(value Vector2.XY)
- func (self Instance) SetPolygon(value []Vector2.XY)
- func (self Instance) SetPolygons(value []any)
- func (self Instance) SetSkeleton(value string)
- func (self Instance) SetTexture(value [1]gdclass.Texture2D)
- func (self Instance) SetTextureOffset(value Vector2.XY)
- func (self Instance) SetTextureRotation(value Float.X)
- func (self Instance) SetTextureScale(value Vector2.XY)
- func (self Instance) SetUv(value []Vector2.XY)
- func (self Instance) SetVertexColors(value []Color.RGBA)
- func (self Instance) Skeleton() string
- func (self Instance) Texture() [1]gdclass.Texture2D
- func (self Instance) TextureOffset() Vector2.XY
- func (self Instance) TextureRotation() Float.X
- func (self Instance) TextureScale() Vector2.XY
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Uv() []Vector2.XY
- func (self Instance) VertexColors() []Color.RGBA
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) Antialiased ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsPolygon2D ¶
func (Instance) ClearBones ¶
func (self Instance) ClearBones()
Removes all bones from this [Polygon2D].
func (Instance) GetBoneCount ¶
Returns the number of bones in this [Polygon2D].
func (Instance) GetBonePath ¶
Returns the path to the node associated with the specified bone.
func (Instance) GetBoneWeights ¶
Returns the weight values of the specified bone.
func (Instance) InternalVertexCount ¶
func (Instance) InvertBorder ¶
func (Instance) InvertEnabled ¶
func (Instance) SetAntialiased ¶
func (Instance) SetBonePath ¶
Sets the path to the node associated with the specified bone.
func (Instance) SetBoneWeights ¶
Sets the weight values for the specified bone.