Updated examples ex02b and ex04b
This commit is contained in:
parent
b8f6705d12
commit
907fb14c79
7 changed files with 45 additions and 31 deletions
|
@ -35,31 +35,28 @@ int main()
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// TODO: draw some shapes... with names... :P
|
||||
/*
|
||||
void DrawPixel(int posX, int posY, Color color);
|
||||
void DrawPixelV(Vector2 position, Color color);
|
||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color);
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color);
|
||||
void DrawCircle(int centerX, int centerY, float radius, Color color);
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2);
|
||||
void DrawCircleV(Vector2 center, float radius, Color color);
|
||||
void DrawCircleLines(int centerX, int centerY, float radius, Color color);
|
||||
void DrawRectangle(int posX, int posY, int width, int height, Color color);
|
||||
void DrawRectangleRec(Rectangle rec, Color color);
|
||||
void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2);
|
||||
void DrawRectangleV(Vector2 position, Vector2 size, Color color);
|
||||
void DrawRectangleLines(int posX, int posY, int width, int height, Color color);
|
||||
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color);
|
||||
void DrawPoly(Vector2 *points, int numPoints, Color color);
|
||||
void DrawPolyLine(Vector2 *points, int numPoints, Color color);
|
||||
*/
|
||||
DrawRectangle(screenWidth/4 - 50, screenHeight/2 - 100, 100, 100, GOLD);
|
||||
DrawCircle(3*screenWidth/4, screenHeight/2 - 50, 50, MAROON);
|
||||
|
||||
DrawText("_____", 320, 280, 50, 1, BLACK);
|
||||
|
||||
DrawText("some basic shapes available on raylib", 20, 20, 20, DARKGRAY);
|
||||
|
||||
DrawLine(18, 42, screenWidth - 18, 42, BLACK);
|
||||
|
||||
DrawCircle(screenWidth/4, 120, 35, DARKBLUE);
|
||||
DrawCircleGradient(screenWidth/4, 220, 60, GREEN, SKYBLUE);
|
||||
DrawCircleLines(screenWidth/4, 340, 80, DARKBLUE);
|
||||
|
||||
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
|
||||
DrawRectangleGradient(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE);
|
||||
|
||||
DrawTriangle((Vector2){screenWidth/4*3, 80},
|
||||
(Vector2){screenWidth/4*3 - 60, 150},
|
||||
(Vector2){screenWidth/4*3 + 60, 150}, VIOLET);
|
||||
|
||||
DrawTriangleLines((Vector2){screenWidth/4*3, 160},
|
||||
(Vector2){screenWidth/4*3 - 20, 230},
|
||||
(Vector2){screenWidth/4*3 + 20, 230}, DARKBLUE);
|
||||
|
||||
DrawPoly((Vector2){screenWidth/4*3, 320}, 6, 80, 0, BROWN);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue