Improved some examples

This commit is contained in:
Ray San 2017-10-17 11:51:50 +02:00
parent b065edc878
commit 5dc216f419
7 changed files with 87 additions and 39 deletions

View file

@ -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