diff options
| author | Ray <[email protected]> | 2017-10-20 00:17:24 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-10-20 00:17:24 +0200 |
| commit | 48daec567f8d22e4492eb47b878d7ff86024f97a (patch) | |
| tree | 14dfb6feec1e4a7a6c03e0a37825aa7703de57d3 /examples/src/textures | |
| parent | 1be9753752eaee413d584b4e9b1de383ba217ecf (diff) | |
| download | raylib.com-48daec567f8d22e4492eb47b878d7ff86024f97a.tar.gz raylib.com-48daec567f8d22e4492eb47b878d7ff86024f97a.zip | |
Reviewed examples code to 1.8
Diffstat (limited to 'examples/src/textures')
| -rw-r--r-- | examples/src/textures/textures_image_drawing.c | 8 |
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 |
