Polygon2D

package
v0.0.0-...-80877a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package Polygon2D provides methods for working with Polygon2D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsPolygon2D() Instance
}

type Instance

type Instance [1]gdclass.Polygon2D

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 New

func New() Instance

func (Instance) AddBone

func (self Instance) AddBone(path string, weights []float32)

Adds a bone with the specified [param path] and [param weights].

func (Instance) Antialiased

func (self Instance) Antialiased() bool

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode2D

func (self Instance) AsNode2D() Node2D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsPolygon2D

func (self Instance) AsPolygon2D() Instance

func (Instance) ClearBones

func (self Instance) ClearBones()

Removes all bones from this [Polygon2D].

func (Instance) Color

func (self Instance) Color() Color.RGBA

func (Instance) EraseBone

func (self Instance) EraseBone(index int)

Removes the specified bone from this [Polygon2D].

func (Instance) GetBoneCount

func (self Instance) GetBoneCount() int

Returns the number of bones in this [Polygon2D].

func (Instance) GetBonePath

func (self Instance) GetBonePath(index int) string

Returns the path to the node associated with the specified bone.

func (Instance) GetBoneWeights

func (self Instance) GetBoneWeights(index int) []float32

Returns the weight values of the specified bone.

func (Instance) InternalVertexCount

func (self Instance) InternalVertexCount() int

func (Instance) InvertBorder

func (self Instance) InvertBorder() Float.X

func (Instance) InvertEnabled

func (self Instance) InvertEnabled() bool

func (Instance) Offset

func (self Instance) Offset() Vector2.XY

func (Instance) Polygon

func (self Instance) Polygon() []Vector2.XY

func (Instance) Polygons

func (self Instance) Polygons() []any

func (Instance) SetAntialiased

func (self Instance) SetAntialiased(value bool)

func (Instance) SetBonePath

func (self Instance) SetBonePath(index int, path string)

Sets the path to the node associated with the specified bone.

func (Instance) SetBoneWeights

func (self Instance) SetBoneWeights(index int, weights []float32)

Sets the weight values for the specified bone.

func (Instance) SetColor

func (self Instance) SetColor(value Color.RGBA)

func (Instance) SetInternalVertexCount

func (self Instance) SetInternalVertexCount(value int)

func (Instance) SetInvertBorder

func (self Instance) SetInvertBorder(value Float.X)

func (Instance) SetInvertEnabled

func (self Instance) SetInvertEnabled(value bool)

func (Instance) SetOffset

func (self Instance) SetOffset(value Vector2.XY)

func (Instance) SetPolygon

func (self Instance) SetPolygon(value []Vector2.XY)

func (Instance) SetPolygons

func (self Instance) SetPolygons(value []any)

func (Instance) SetSkeleton

func (self Instance) SetSkeleton(value string)

func (Instance) SetTexture

func (self Instance) SetTexture(value [1]gdclass.Texture2D)

func (Instance) SetTextureOffset

func (self Instance) SetTextureOffset(value Vector2.XY)

func (Instance) SetTextureRotation

func (self Instance) SetTextureRotation(value Float.X)

func (Instance) SetTextureScale

func (self Instance) SetTextureScale(value Vector2.XY)

func (Instance) SetUv

func (self Instance) SetUv(value []Vector2.XY)

func (Instance) SetVertexColors

func (self Instance) SetVertexColors(value []Color.RGBA)

func (Instance) Skeleton

func (self Instance) Skeleton() string

func (Instance) Texture

func (self Instance) Texture() [1]gdclass.Texture2D

func (Instance) TextureOffset

func (self Instance) TextureOffset() Vector2.XY

func (Instance) TextureRotation

func (self Instance) TextureRotation() Float.X

func (Instance) TextureScale

func (self Instance) TextureScale() Vector2.XY

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Uv

func (self Instance) Uv() []Vector2.XY

func (Instance) VertexColors

func (self Instance) VertexColors() []Color.RGBA

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL