Bitmap

A class of bitmap.

Constructors

this
this(vec2i sz)
this
this(vec2i sz, Type* src)
this
this(vec2i sz, Type[] src)

Destructor

~this
~this()

Members

Aliases

Type
alias Type = _Type

Type of the number that shows color.

Functions

clear
void clear()

Fills the bitmap data with 0.

conservativeResize
auto conservativeResize(vec2i sz)

Creates resized bitmap with the same format.

dispose
void dispose()

Releases all memories.

overwrite
void overwrite(vec2i offset, typeof(this) bmp)

Modifies a part of the bitmap.

resize
void resize(vec2i sz)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

LengthPerPixel
enum LengthPerPixel;

Length to show the color of pixel.

this_is_a_bitmap_class_of_g4d
enum this_is_a_bitmap_class_of_g4d;

To prove this is bitmap.

Properties

data
data [@property getter]

Readonly pointer to data.

dataByteSize
dataByteSize [@property getter]

Size of the bitmap data in byte.

dataLength
dataLength [@property getter]

Length of the bitmap data.

rows
rows [@property getter]

Height of the bitmap.

size
size [@property getter]

Size of the bitmap.

width
width [@property getter]

Width of the bitmap.

Variables

_data
Type* _data;
_rows
size_t _rows;
Undocumented in source.
_width
size_t _width;
Undocumented in source.

Meta