diff options
| author | Jeffery Myers <[email protected]> | 2021-02-20 14:37:32 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-20 23:37:32 +0100 |
| commit | 48a7cd3c8788799505b4fa9f84cb8f5979397c29 (patch) | |
| tree | f9cbed3827f8855d0e3c27916930b9d82de3e423 /examples/textures/textures_image_drawing.c | |
| parent | 82cdd88ffe6cb9d2f97e34bd0724d791030372bf (diff) | |
| download | raylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.tar.gz raylib-48a7cd3c8788799505b4fa9f84cb8f5979397c29.zip | |
[Examples] Fix typecast warnings in examples. (#1601)
* Fixing typecast warnings generated by visual studio 2019 in examples.
* Changes to fixes based on feedback
Co-authored-by: Jeffery Myers <[email protected]>
Diffstat (limited to 'examples/textures/textures_image_drawing.c')
| -rw-r--r-- | examples/textures/textures_image_drawing.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/textures/textures_image_drawing.c b/examples/textures/textures_image_drawing.c index 6e794582..ea3cb319 100644 --- a/examples/textures/textures_image_drawing.c +++ b/examples/textures/textures_image_drawing.c @@ -32,8 +32,8 @@ int main(void) Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) // Draw one image over the other with a scaling of 1.5f - ImageDraw(&parrots, cat, (Rectangle){ 0, 0, cat.width, cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE); - ImageCrop(&parrots, (Rectangle){ 0, 50, parrots.width, parrots.height - 100 }); // Crop resulting image + ImageDraw(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE); + ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image // Draw on the image with a few image draw methods ImageDrawPixel(&parrots, 10, 10, RAYWHITE); @@ -46,7 +46,7 @@ int main(void) Font font = LoadFont("resources/custom_jupiter_crash.png"); // Draw over image using custom font - ImageDrawTextEx(&parrots, font, "PARROTS & CAT", (Vector2){ 300, 230 }, font.baseSize, -2, WHITE); + ImageDrawTextEx(&parrots, font, "PARROTS & CAT", (Vector2){ 300, 230 }, (float)font.baseSize, -2, WHITE); UnloadFont(font); // Unload custom spritefont (already drawn used on image) |
