-
Notifications
You must be signed in to change notification settings - Fork 2
RShapes
JoeStrout edited this page Apr 15, 2026
·
1 revision
| Name | Parameters | Purpose |
|---|---|---|
| DrawPixel | posX=0, posY=0, color=WHITE | Draw a pixel |
| DrawPixelV | position=[0, 0], color=WHITE | Draw a pixel (Vector version) |
| DrawLine | startPosX=0, startPosY=0, endPosX=0, endPosY=0, color=WHITE | Draw a line (using gl lines) |
| DrawLineV | startPos=[0, 0], endPos=[0, 0], color=WHITE | Draw a line (using gl lines) |
| DrawLineEx | startPos=[0, 0], endPos=[0, 0], thick=1, color=WHITE | Draw a line defining thickness |
| DrawCircle | centerX=100, centerY=100, radius=32, color=WHITE | Draw a color-filled circle |
| DrawCircleV | center=[100, 100], radius=32, color=WHITE | Draw a color-filled circle (Vector version) NOTE: On OpenGL 3.3 and ES2 using QUADS to avoid drawing order issues |
| DrawCircleLines | centerX=100, centerY=100, radius=32, color=WHITE | Draw circle outline |
| DrawEllipse | centerX=100, centerY=100, radiusH=32, radiusV=32, color=WHITE | Draw ellipse |
| DrawEllipseLines | centerX=100, centerY=100, radiusH=32, radiusV=32, color=WHITE | Draw ellipse outline |
| DrawRing | center=[100, 100], innerRadius=20, outerRadius=32, startAngle=0, endAngle=360, segments=36, color=WHITE | Draw ring |
| DrawRingLines | center=[100, 100], innerRadius=20, outerRadius=32, startAngle=0, endAngle=360, segments=36, color=WHITE | Draw ring outline |
| DrawRectangle | x=0, y=0, width=256, height=256, color=WHITE | Draw a color-filled rectangle |
| DrawRectangleV | position=[0, 0], size=[256, 256], color=WHITE | Draw a color-filled rectangle (Vector version) NOTE: On OpenGL 3.3 and ES2 using QUADS to avoid drawing order issues |
| DrawRectangleRec | rec, color=WHITE | Draw a color-filled rectangle |
| DrawRectanglePro | rec, origin=[0, 0], rotation=0, color=WHITE | Draw a color-filled rectangle with pro parameters |
| DrawRectangleLines | x=0, y=0, width=256, height=256, color | Draw rectangle outline WARNING: All Draw*Lines() functions use RL_LINES for drawing, it implies flushing the current batch and changing draw mode to RL_LINES but it solves another issue: https://github.com/raysan5/raylib/issues/3884 |
| DrawRectangleLinesEx | rec, lineThick=1, color=WHITE | Draw rectangle outline with extended parameters |
| DrawRectangleRounded | rec, roundness=0.5, segments=36, color=WHITE | Draw rectangle with rounded edges |
| DrawRectangleRoundedLines | rec, roundness=0.5, segments=36, color=WHITE | Draw rectangle with rounded edges |
| DrawRectangleGradientV | posX=0, posY=0, width=256, height=256, color1=WHITE, color2=BLACK | Draw a vertical-gradient-filled rectangle |
| DrawRectangleGradientH | posX=0, posY=0, width=256, height=256, color1=WHITE, color2=BLACK | Draw a horizontal-gradient-filled rectangle |
| DrawRectangleGradientEx | rec, col1, col2, col3, col4 | Draw a gradient-filled rectangle |
| DrawTriangle | v1, v2, v3, color=WHITE | Draw a triangle NOTE: Vertex must be provided in counter-clockwise order |
| DrawTriangleLines | v1, v2, v3, color=WHITE | Draw a triangle using lines NOTE: Vertex must be provided in counter-clockwise order |
| DrawPoly | center=[100, 100], sides=6, radius=32, rotation=0, color=WHITE | Draw a regular polygon of n sides (Vector version) |
| DrawPolyLines | center=[100, 100], sides=6, radius=32, rotation=0, color=WHITE | Draw a polygon outline of n sides |
| DrawPolyLinesEx | center=[100, 100], sides=6, radius=32, rotation=0, lineThick=1, color=WHITE | |
| CheckCollisionRecs | rec1, rec2 | Check collision between two rectangles |
| CheckCollisionCircles | center1, radius1, center2, radius2 | Check collision between two circles |
| CheckCollisionCircleRec | center, radius, rec | Check collision between circle and rectangle NOTE: Reviewed version to take into account corner limit case |
| CheckCollisionPointRec | point, rec | Check if point is inside rectangle |
| CheckCollisionPointCircle | point, center, radius | Check if point is inside circle |
| CheckCollisionPointTriangle | point, p1, p2, p3 | Check if point is inside a triangle defined by three points (p1, p2, p3) |
| GetCollisionRec | rec1, rec2 | Get collision rectangle for two rectangles collision |
| CheckCollisionCircleLine | center, radius, p1, p2 | Check if circle collides with a line created between two points [p1] and [p2] |
| CheckCollisionLines | startPos1, endPos1, startPos2, endPos2 | Check the collision between two lines defined by two points each, returns collision point by reference REF: https://en.wikipedia.org/wiki/Line–line_intersection#Given_two_points_on_each_line_segment |
| CheckCollisionPointLine | point, p1, p2, threshold | Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] |
| CheckCollisionPointPoly | point, points | Check if point is within a polygon described by array of vertices NOTE: Based on http://jeffreythompson.org/collision-detection/poly-point.php |
| DrawCircleGradient | centerX=0, centerY=0, radius=10.0, colorInner=WHITE, colorOuter=BLACK | Draw a gradient-filled circle |
| DrawCircleLinesV | center, radius=10.0, color=WHITE | Draw circle outline (Vector version) |
| DrawCircleSector | center, radius=10.0, startAngle=0, endAngle=90.0, segments=36, color=WHITE | Draw a piece of a circle |
| DrawCircleSectorLines | center, radius=10.0, startAngle=0, endAngle=90.0, segments=36, color=WHITE | Draw a piece of a circle outlines |
| DrawEllipseV | center, radiusH=10.0, radiusV=5.0, color=WHITE | Draw ellipse (Vector version) |
| DrawEllipseLinesV | center, radiusH=10.0, radiusV=5.0, color=WHITE | Draw ellipse outline |
| DrawLineBezier | startPos, endPos, thick=1.0, color=WHITE | Draw line using cubic-bezier spline, in-out interpolation, no control points |
| DrawLineDashed | startPos, endPos, dashSize, spaceSize, color=WHITE | Draw a dashed line |
| DrawLineStrip | points, color=WHITE | Draw lines sequuence (using gl lines) |
| DrawRectangleRoundedLinesEx | rec, roundness=0.0, segments=0, lineThick=1.0, color=WHITE | Draw rectangle with rounded edges outline |
| DrawSplineLinear | points, thick=1.0, color=WHITE | Draw spline: linear, minimum 2 points |
| DrawSplineBasis | points, thick=1.0, color=WHITE | Draw spline: B-Spline, minimum 4 points |
| DrawSplineCatmullRom | points, thick=1.0, color=WHITE | Draw spline: Catmull-Rom, minimum 4 points |
| DrawSplineBezierQuadratic | points, thick=1.0, color=WHITE | Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] |
| DrawSplineBezierCubic | points, thick=1.0, color=WHITE | Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] |
| DrawSplineSegmentLinear | p1, p2, thick=1.0, color=WHITE | Draw spline segment: Linear, 2 points |
| DrawSplineSegmentBasis | p1, p2, p3, p4, thick=1.0, color=WHITE | Draw spline segment: B-Spline, 4 points |
| DrawSplineSegmentCatmullRom | p1, p2, p3, p4, thick=1.0, color=WHITE | Draw spline segment: Catmull-Rom, 4 points |
| DrawSplineSegmentBezierQuadratic | p1, p2, p3, thick=1.0, color=WHITE | Draw spline segment: Quadratic Bezier, 2 points, 1 control point |
| DrawSplineSegmentBezierCubic | p1, p2, p3, p4, thick=1.0, color=WHITE | Draw spline segment: Cubic Bezier, 2 points, 2 control points |
| GetSplinePointLinear | startPos, endPos, t | Get spline point for a given t [0.0f .. 1.0f], Linear |
| GetSplinePointBasis | p1, p2, p3, p4, t | Get spline point for a given t [0.0f .. 1.0f], B-Spline |
| GetSplinePointCatmullRom | p1, p2, p3, p4, t | Get spline point for a given t [0.0f .. 1.0f], Catmull-Rom |
| GetSplinePointBezierQuad | p1, c2, p3, t | Get spline point for a given t [0.0f .. 1.0f], Quadratic Bezier |
| GetSplinePointBezierCubic | p1, c2, c3, p4, t | Get spline point for a given t [0.0f .. 1.0f], Cubic Bezier |
| DrawTriangleFan | points, color=WHITE | Draw a triangle fan defined by points NOTE: First vertex provided is the center, shared by all triangles By default, following vertex should be provided in counter-clockwise order |
| DrawTriangleStrip | points, color=WHITE | Draw a triangle strip defined by points NOTE: Every new vertex connects with previous two |
| SetShapesTexture | texture, source | Set texture and rectangle to be used on shapes drawing NOTE: It can be useful when using basic shapes and one single font, defining a font char white rectangle would allow drawing everything in a single draw call |
| GetShapesTexture | Get texture that is used for shapes drawing | |
| GetShapesTextureRectangle | Get texture source rectangle that is used for shapes drawing |