Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Polygon2D¶
Inherits: Node2D < CanvasItem < Node < Object
A 2D polygon.
Description¶
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.
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
void |
add_bone ( NodePath path, PackedFloat32Array weights ) |
void |
clear_bones ( ) |
void |
erase_bone ( int index ) |
get_bone_count ( ) const |
|
get_bone_path ( int index ) const |
|
get_bone_weights ( int index ) const |
|
void |
set_bone_path ( int index, NodePath path ) |
void |
set_bone_weights ( int index, PackedFloat32Array weights ) |
Property Descriptions¶
bool antialiased = false
If true
, polygon edges will be anti-aliased.
Array bones = []
Internal list of Bone2D nodes used by the assigned skeleton. Edited using the Polygon2D editor ("UV" button on the top toolbar).
Color color = Color(1, 1, 1, 1)
The polygon's fill color. If texture is set, it will be multiplied by this color. It will also be the default color for vertices not set in vertex_colors.
int internal_vertex_count = 0