summaryrefslogtreecommitdiffhomepage
path: root/examples/src/textures
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/textures')
-rw-r--r--examples/src/textures/textures_image_drawing.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/src/textures/textures_image_drawing.c b/examples/src/textures/textures_image_drawing.c
index 1c6a1fb..ac128af 100644
--- a/examples/src/textures/textures_image_drawing.c
+++ b/examples/src/textures/textures_image_drawing.c
@@ -36,6 +36,14 @@ int main()
ImageCrop(&parrots, (Rectangle){ 0, 50, parrots.width, parrots.height - 100 }); // Crop resulting image
UnloadImage(cat); // Unload image from RAM
+
+ // Load custom font for frawing on image
+ SpriteFont font = LoadSpriteFont("resources/custom_jupiter_crash.png");
+
+ // Draw over image using custom font
+ ImageDrawTextEx(&parrots, (Vector2){ 300, 230 }, font, "PARROTS & CAT", font.baseSize, -2, WHITE);
+
+ UnloadSpriteFont(font); // Unload custom spritefont (already drawn used on image)
Texture2D texture = LoadTextureFromImage(parrots); // Image converted to texture, uploaded to GPU memory (VRAM)
UnloadImage(parrots); // Once image has been converted to texture and uploaded to VRAM, it can be unloaded from RAM