From 48daec567f8d22e4492eb47b878d7ff86024f97a Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 20 Oct 2017 00:17:24 +0200 Subject: Reviewed examples code to 1.8 --- examples/src/textures/textures_image_drawing.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'examples/src/textures') 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 -- cgit v1.2.3