Texture

Image or texture can be rendered by Fluid, for example, a texture stored in VRAM.

Textures make use of manual memory management. See TextureGC for a GC-managed texture.

Members

Functions

backend
inout(FluidBackend) backend()

Get the backend for this texture. Doesn't work after freeing the tombstone.

canvasSize
Vector2 canvasSize()

Get texture size as a vector.

destroy
void destroy()

Destroy this texture. This function is thread-safe.

dpi
Vector2 dpi()

DPI value of the texture.

draw
void draw(Vector2 position, Color tint)

Draw this texture.

draw
void draw(Rectangle rectangle, Color tint)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
void opAssign(raylib.Texture rayTexture)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Texture other)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update(Image image)

Update the texture to match the given image.

viewportSize
Vector2 viewportSize()

Get the size the texture will occupy within the viewport.

Variables

dpiX
int dpiX;
dpiY
int dpiY;

Dots per inch for the X and Y axis. Defaults to 96, thus making a dot in the texture equivalent to a pixel.

format
Image.Format format;

Format of the texture.

height
int height;

Width and height of the texture, **in dots**. The meaning of a dot is defined by dpiX and dpiY

id
uint id;

GPU/backend ID of the texture.

palette
Color[] palette;

If relevant, the texture is to use this palette.

tombstone
shared(TextureTombstone)* tombstone;

Tombstone for this texture

width
int width;

Width and height of the texture, **in dots**. The meaning of a dot is defined by dpiX and dpiY

Meta