BitMap

    Category: Core

    Boolean matrix.

    • void create ( size )

    Creates a bitmap with the specified size, filled with .


    • void create_from_image_alpha ( Image image, threshold=0.1 )

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


    • bool get_bit ( position ) const

    Returns bitmap’s dimensions.


    • int get_true_bit_count ( ) const

    Returns the amount of bitmap elements that are set to .


    • void grow_mask ( pixels, Rect2 rect )

    • opaque_to_polygons ( Rect2 rect, epsilon=2.0 ) const


    • void set_bit_rect ( Rect2 rect, bit )

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