diff options
| author | raysan5 <[email protected]> | 2013-12-20 12:50:43 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2013-12-20 12:50:43 +0100 |
| commit | 907fb14c797c3bfcf8c9e9d46c9280c056146088 (patch) | |
| tree | a053a3ff8d221fa9196a99500f95c8f4ae3a2715 /examples/ex02b_basic_shapes.c | |
| parent | b8f6705d126f3d80b74879abc6b4a88c0b9a8d74 (diff) | |
| download | raylib-907fb14c797c3bfcf8c9e9d46c9280c056146088.tar.gz raylib-907fb14c797c3bfcf8c9e9d46c9280c056146088.zip | |
Updated examples ex02b and ex04b
Diffstat (limited to 'examples/ex02b_basic_shapes.c')
| -rw-r--r-- | examples/ex02b_basic_shapes.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/examples/ex02b_basic_shapes.c b/examples/ex02b_basic_shapes.c index ce16d4c8..de70a180 100644 --- a/examples/ex02b_basic_shapes.c +++ b/examples/ex02b_basic_shapes.c @@ -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(); //---------------------------------------------------------------------------------- } |
