Prowl.Quill treats textures as opaqueDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Quill/llms.txt
Use this file to discover all available pages before exploring further.
object handles created and owned by the backend renderer. The canvas never allocates GPU memory directly — it simply records which texture object belongs to each draw call and passes that handle back to the backend’s RenderCalls implementation. This design makes Quill portable across OpenGL, Vulkan, DirectX, Raylib, SFML, and any other backend that implements ICanvasRenderer.
Textures must be created through the backend renderer’s
ICanvasRenderer.CreateTexture method before being passed to the canvas. The exact type of the returned object is backend-specific (e.g., an int OpenGL texture ID wrapped in a BoxedInt, or a Texture2D object in a Raylib backend). Never instantiate texture objects directly.Drawing Images
DrawImage — Explicit Size
Draws a texture mapped into a rectangle at (x, y) with the given width and height. The canvas respects the current transform, scissor region, and global alpha.
| Parameter | Description |
|---|---|
texture | Backend texture handle created via ICanvasRenderer.CreateTexture |
x, y | Top-left corner in logical units |
width, height | Size in logical units (must be positive) |
tint | Optional color multiplied with each texel. Default null = white = no tint |
DrawImage — Native Size
Draws a texture at (x, y) using the texture’s natural pixel dimensions converted to logical units.
ICanvasRenderer.GetTextureSize(texture) to determine the native dimensions and then delegates to the explicit-size overload.
The Tint Parameter
Whentint is null (or explicitly new Color32(255, 255, 255, 255)), texels are drawn at their original colors. A tint color is multiplied component-wise with each texel in the shader, so:
- White
(255, 255, 255, 255)→ no change - Red
(255, 0, 0, 255)→ only the red channel of each texel survives - Alpha 128 → the whole image is 50% transparent
Brush Textures
For tiling patterns, world-space decals, or textured shapes, you can attach a texture directly to the canvas brush. UnlikeDrawImage (which creates a temporary brush internally), brush textures persist across draw calls until you clear them.
SetBrushTexture
Attaches a texture to the current brush. By default, the texture transform is initialised so that 1 logical unit = 1 texel, starting at the world origin.
SetBrushTextureTransform
Controls how world coordinates map to texture UV space. The transform is combined with the current canvas transform, so rotating or scaling the canvas also rotates/scales the texture.