Image

画像を表すクラスです. load()で画像を読み込み,draw()で表示することができます.

Constructors

this
this()
Undocumented in source.

Members

Functions

allocate
Image allocate()

与えられたbitmapを元にtextureとrectを生成します

bitmap
Bitmap!(char) bitmap()

Return bitmap pointer.

bitmap
Image bitmap(Bitmap!(char) data)

Set bitmap

draw
Image draw(T x, T y, T z)

Draw image data which loaded in advance.

draw
Image draw(T position)

Draw image data which loaded in advance.

drawCropped
Image drawCropped(T x, T y, T startX, T startY, T endX, T endY)
Undocumented in source. Be warned that the author may not have intended to support it.
drawCropped
Image drawCropped(T x, T y, T z, T startX, T startY, T endX, T endY)
Undocumented in source. Be warned that the author may not have intended to support it.
height
int height()

Return height.

isLoaded
bool isLoaded()

Retun true if the image was loaded.

load
Image load(string pathInDataDir)

Load image.

magFilter
Image magFilter(TextureMagFilter filter)
material
Material material()
minFilter
Image minFilter(TextureMinFilter filter)
minMagFilter
Image minMagFilter(TextureMinFilter minFilter, TextureMagFilter magFilter)
setFromAlignedPixels
Image setFromAlignedPixels(T* pixels, int width, int height, ColorFormat format)

Generate a image from the aligned pixels

size
Vector2i size()

Return image size.

texture
Texture texture()
width
int width()

Return width.

Meta