2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-07-02 19:13:43 -04:00

Update enum/color names to match C# naming convention (#224)

This commit is contained in:
Danil
2024-01-18 21:00:57 +02:00
committed by GitHub
parent 2a1889403d
commit 70d86837d4
123 changed files with 1843 additions and 1847 deletions

View File

@ -38,13 +38,13 @@ public class ImageDrawing
// Draw one image over the other with a scaling of 1.5f
Rectangle src = new(0, 0, cat.Width, cat.Height);
ImageDraw(ref parrots, cat, src, new Rectangle(30, 40, cat.Width * 1.5f, cat.Height * 1.5f), Color.WHITE);
ImageDraw(ref parrots, cat, src, new Rectangle(30, 40, cat.Width * 1.5f, cat.Height * 1.5f), Color.White);
ImageCrop(ref parrots, new Rectangle(0, 50, parrots.Width, parrots.Height - 100));
// Draw on the image with a few image draw methods
ImageDrawPixel(ref parrots, 10, 10, Color.RAYWHITE);
ImageDrawCircle(ref parrots, 10, 10, 5, Color.RAYWHITE);
ImageDrawRectangle(ref parrots, 5, 20, 10, 10, Color.RAYWHITE);
ImageDrawPixel(ref parrots, 10, 10, Color.RayWhite);
ImageDrawCircle(ref parrots, 10, 10, 5, Color.RayWhite);
ImageDrawRectangle(ref parrots, 5, 20, 10, 10, Color.RayWhite);
UnloadImage(cat);
@ -52,7 +52,7 @@ public class ImageDrawing
Font font = LoadFont("resources/fonts/custom_jupiter_crash.png");
// Draw over image using custom font
ImageDrawTextEx(ref parrots, font, "PARROTS & CAT", new Vector2(300, 230), font.BaseSize, -2, Color.WHITE);
ImageDrawTextEx(ref parrots, font, "PARROTS & CAT", new Vector2(300, 230), font.BaseSize, -2, Color.White);
// Unload custom spritefont (already drawn used on image)
UnloadFont(font);
@ -74,17 +74,17 @@ public class ImageDrawing
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(Color.RAYWHITE);
ClearBackground(Color.RayWhite);
int x = screenWidth / 2 - texture.Width / 2;
int y = screenHeight / 2 - texture.Height / 2;
DrawTexture(texture, x, y - 40, Color.WHITE);
DrawRectangleLines(x, y - 40, texture.Width, texture.Height, Color.DARKGRAY);
DrawTexture(texture, x, y - 40, Color.White);
DrawRectangleLines(x, y - 40, texture.Width, texture.Height, Color.DarkGray);
DrawText("We are drawing only one texture from various images composed!", 240, 350, 10, Color.DARKGRAY);
DrawText("We are drawing only one texture from various images composed!", 240, 350, 10, Color.DarkGray);
string text = "Source images have been cropped, scaled, flipped and copied one over the other.";
DrawText(text, 90, 370, 10, Color.DARKGRAY);
DrawText(text, 90, 370, 10, Color.DarkGray);
EndDrawing();
//----------------------------------------------------------------------------------