Plexigon2D
Extends: Node2D
Description
Dungeondraft only 2D rendering polygon class used to draw multiple complex polygons in one single instance.
Properties
Color | color |
bool | fade_in |
Methods
void | add_outline ( Vector2[] outline ) |
void | add_outline_at_index ( Vector2[] outline, int index ) |
void | clear_outlines ( ) |
void | clear_polygons ( ) |
Vector2[] | get_outline ( int idx ) |
int | get_outline_count ( ) |
int[] | get_polygon ( int idx ) |
int | get_polygon_count ( ) |
Vector2[] | get_vertices ( ) |
void | make_polygons_from_outlines ( ) |
void | mark_outline_as_fade ( int value ) |
void | remove_outline ( int idx ) |
void | set_outline ( int idx, Vector2[] outline ) |
Property Descriptions
- Color color:
The color to fill this polygon with.
- bool fade_in:
Toggles whether or not the border should fade into full color. Used by the water.
Method Descriptions
- void add_outline ( Vector2[] outline ):
Add a new shape once make_polygons_from_outlines is called(). An outline is a set of points indicating a new polygon yet to be merged with the Plexigon to be drawn.
- void add_outline_at_index ( Vector2[] outline, int index ):
Add a new shape at a specific index.
- void clear_outlines ( ):
Clear all the outlines.
- void clear_polygons ( ):
Clear all polygons. Not advisable to call directly.
- Vector2[] get_outline ( int idx ):
Get the points of a outline by id.
- int get_outline_count ( ):
Get total number of outlines. Once converted to polygon and cleared, it would be zero.
- int[] get_polygon ( int idx ):
Get the vertex indices of a specific polygon.
- int get_polygon_count ( ):
Get total polygon count.
- Vector2[] get_vertices ( ):
Get all the vertices in all polygons in an Array.
- void make_polygons_from_outlines ( ):
Call once all the new outlines are added to convert them into polygons that are drawn.
- void mark_outline_as_fade ( int value ):
Indicate which outline id are ones that are the edges that should fade.
- void remove_outline ( int idx ):
Delete outline by id.
- void set_outline ( int idx, Vector2[] outline ):
Replace outline by id.