Remove trailing spaces

This commit is contained in:
Ray
2026-03-25 16:51:02 +01:00
parent 5dd4036ed0
commit 0f0983c065
23 changed files with 184 additions and 185 deletions

View File

@ -51,7 +51,7 @@ int main(void)
{
// Unload textures to avoid memory leaks
for (int i = 0; i < MAX_TEXTURE_COLLECTION; i++) UnloadTexture(collection[i].texture);
currentCollectionIndex = 0;
}
@ -59,7 +59,7 @@ int main(void)
(currentCollectionIndex < MAX_TEXTURE_COLLECTION))
{
Image image = GetClipboardImage();
if (IsImageValid(image))
{
collection[currentCollectionIndex].texture = LoadTextureFromImage(image);
@ -76,15 +76,15 @@ int main(void)
BeginDrawing();
ClearBackground(RAYWHITE);
for (int i = 0; i < currentCollectionIndex; i++)
{
if (IsTextureValid(collection[i].texture))
{
DrawTexturePro(collection[i].texture,
(Rectangle){0,0,collection[i].texture.width, collection[i].texture.height},
DrawTexturePro(collection[i].texture,
(Rectangle){0,0,collection[i].texture.width, collection[i].texture.height},
(Rectangle){collection[i].position.x,collection[i].position.y,collection[i].texture.width, collection[i].texture.height},
(Vector2){collection[i].texture.width*0.5f, collection[i].texture.height*0.5f},
(Vector2){collection[i].texture.width*0.5f, collection[i].texture.height*0.5f},
0.0f, WHITE);
}
}

View File

@ -3,7 +3,7 @@
* raylib textures example - magnifying glass
*
* Example complexity rating: [★★★☆] 3/4
*
*
* Example originally created with raylib 5.6, last time updated with raylib 5.6
*
* Example contributed by Luke Vaughan (@badram) and reviewed by Ramon Santamaria (@raysan5)
@ -29,18 +29,18 @@ int main(void)
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [textures] example - magnifying glass");
Texture2D bunny = LoadTexture("resources/raybunny.png");
Texture2D parrots = LoadTexture("resources/parrots.png");
// Use image draw to generate a mask texture instead of loading it from a file.
Image circle = GenImageColor(256, 256, BLANK);
ImageDrawCircle(&circle, 128, 128, 128, WHITE);
Texture2D mask = LoadTextureFromImage(circle); // Copy the mask image from RAM to VRAM
UnloadImage(circle); // Unload the image from RAM
RenderTexture2D magnifiedWorld = LoadRenderTexture(256, 256);
Camera2D camera = { 0 };
// Set magnifying glass zoom
camera.zoom = 2;
@ -71,7 +71,7 @@ int main(void)
DrawTexture(parrots, 144, 33, WHITE);
DrawText("Use the magnifying glass to find hidden bunnies!", 154, 6, 20, BLACK);
// Render to a the magnifying glass
// Render to a the magnifying glass
BeginTextureMode(magnifiedWorld);
ClearBackground(RAYWHITE);

View File

@ -52,7 +52,7 @@ int main(void)
float hue = t*t;
float saturation = t;
float value = t;
palette[i] = ColorFromHSV(250.0f + 150.0f*hue, saturation, value);
}
@ -92,14 +92,14 @@ int main(void)
{
unsigned int i = x + y*imageWidth;
unsigned char colorIndex = indexBuffer[i];
if (colorIndex != 0)
{
// Move pixel a row above
indexBuffer[i] = 0;
int moveX = GetRandomValue(0, 2) - 1;
int newX = x + moveX;
if ((newX > 0) && (newX < imageWidth))
{
unsigned int iabove = i - imageWidth + moveX;
@ -130,7 +130,7 @@ int main(void)
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawTextureEx(screenTexture, (Vector2){ 0, 0 }, 0.0f, 2.0f, WHITE);