Skip to content

Commit

Permalink
Corrected examples after API change: ImageDrawText*()
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Apr 11, 2020
1 parent cc81634 commit a7311af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/textures/textures_image_drawing.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(void)
Font font = LoadFont("resources/custom_jupiter_crash.png");

// Draw over image using custom font
ImageDrawTextEx(&parrots, (Vector2){ 300, 230 }, font, "PARROTS & CAT", font.baseSize, -2, WHITE);
ImageDrawTextEx(&parrots, font, "PARROTS & CAT", (Vector2){ 300, 230 }, font.baseSize, -2, WHITE);

UnloadFont(font); // Unload custom spritefont (already drawn used on image)

Expand Down
2 changes: 1 addition & 1 deletion examples/textures/textures_image_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(void)
Font font = LoadFontEx("resources/KAISG.ttf", 64, 0, 0);

// Draw over image using custom font
ImageDrawTextEx(&parrots, (Vector2){ 20.0f, 20.0f }, font, "[Parrots font drawing]", (float)font.baseSize, 0.0f, RED);
ImageDrawTextEx(&parrots, font, "[Parrots font drawing]", (Vector2){ 20.0f, 20.0f }, (float)font.baseSize, 0.0f, RED);

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
Expand Down

0 comments on commit a7311af

Please sign in to comment.