diff options
author | sygi <sygnowski@gmail.com> | 2021-03-21 20:46:28 +0000 |
---|---|---|
committer | sygi <sygnowski@gmail.com> | 2021-06-11 14:06:02 +0100 |
commit | a74791ed68c38b0ed429c238427e5197eb9f951e (patch) | |
tree | 31167a8d4885bd17092aa14976aeaf139217fd7d /doc/classes | |
parent | 992de9c053720f7a2d6f7144297486f6ebfa32ff (diff) |
Add documentation to Bitmaps opaque_to_polygons.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/BitMap.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 27ead07e6f..83e598d2ba 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -71,6 +71,12 @@ <argument index="1" name="epsilon" type="float" default="2.0"> </argument> <description> + Creates an [Array] of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a [PackedVector2Array] of its vertices. + To get polygons covering the whole bitmap, pass: + [codeblock] + Rect2(Vector2(), get_size()) + [/codeblock] + [code]epsilon[/code] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [code]epsilon[/code] corresponds to more points in the polygons. </description> </method> <method name="set_bit"> |