Boolean matrix.
    public class BitMap : Resource

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.

Inheritance Chain


    public BitMap()


    public Dictionary Data { get; set; }


    public void Create(Vector2 size)

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

    public void CreateFromImageAlpha(Image image)

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 0, and true in other case.

    public bool GetBit(Vector2 position)

Returns bitmap’s value at the specified position.

    public Vector2 GetSize()

Returns bitmap’s dimensions.

    public int GetTrueBitCount()

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

    public void SetBit(Vector2 position, bool bit)

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

    public void SetBitRect(Rect2 pRect, bool bit)

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