BitMap

Boolean matrix.

A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_getData
Dictionary _getData()
_setData
void _setData(Dictionary arg0)
create
void create(Vector2 size)

Creates a bitmap with the specified size, filled with false.

createFromImageAlpha
void createFromImageAlpha(Image image, double threshold)

Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to false if the alpha value of the image at that position is equal to threshold or less, and true in other case.

getBit
bool getBit(Vector2 position)

Returns bitmap's value at the specified position.

getSize
Vector2 getSize()

Returns bitmap's dimensions.

getTrueBitCount
long getTrueBitCount()

Returns the amount of bitmap elements that are set to true.

growMask
void growMask(long pixels, Rect2 rect)

Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(BitMap other)
opEquals
bool opEquals(typeof(null) n)
opaqueToPolygons
Array opaqueToPolygons(Rect2 rect, double epsilon)
setBit
void setBit(Vector2 position, bool bit)

Sets the bitmap's element at the specified position, to the specified value.

setBitRect
void setBitRect(Rect2 rect, bool bit)

Sets a rectangular portion of the bitmap to the specified value.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

data
Dictionary data [@property getter]
Dictionary data [@property setter]

Static functions

_new
BitMap _new()

Construct a new instance of BitMap. Note: use memnew!BitMap instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta