51#if !defined(EXTERNAL_CONFIG_FLAGS)
55#if defined(SUPPORT_MODULE_RSHAPES)
67#ifndef SMOOTH_CIRCLE_ERROR_RATE
68 #define SMOOTH_CIRCLE_ERROR_RATE 0.5f
70#ifndef BEZIER_LINE_DIVISIONS
71 #define BEZIER_LINE_DIVISIONS 24
125void DrawLine(
int startPosX,
int startPosY,
int endPosX,
int endPosY,
Color color)
147 Vector2 delta = { endPos.
x - startPos.
x, endPos.
y - startPos.
y };
148 float length = sqrtf(delta.
x*delta.
x + delta.
y*delta.
y);
150 if ((length > 0) && (thick > 0))
152 float scale = thick/(2*length);
153 Vector2 radius = { -scale*delta.
y, scale*delta.
x };
155 { startPos.
x - radius.
x, startPos.
y - radius.
y },
156 { startPos.
x + radius.
x, startPos.
y + radius.
y },
157 { endPos.
x - radius.
x, endPos.
y - radius.
y },
158 { endPos.
x + radius.
x, endPos.
y + radius.
y }
196 float a = powf(1 - t, 2);
197 float b = 2*(1 - t)*t;
198 float c = powf(t, 2);
201 current.
y = a*startPos.
y + b*controlPos.
y + c*endPos.
y;
202 current.
x = a*startPos.
x + b*controlPos.
x + c*endPos.
x;
222 float a = powf(1 - t, 3);
223 float b = 3*powf(1 - t, 2)*t;
224 float c = 3*(1-t)*powf(t, 2);
225 float d = powf(t, 3);
227 current.
y = a*startPos.
y + b*startControlPos.
y + c*endControlPos.
y + d*endPos.
y;
228 current.
x = a*startPos.
x + b*startControlPos.
x + c*endControlPos.
x + d*endPos.
x;
246 for (
int i = 0; i < pointCount - 1; i++)
264 if (radius <= 0.0f) radius = 0.1f;
267 if (endAngle < startAngle)
270 float tmp = startAngle;
271 startAngle = endAngle;
275 int minSegments = (int)ceilf((endAngle - startAngle)/90);
277 if (segments < minSegments)
281 segments = (int)((endAngle - startAngle)*ceilf(2*
PI/th)/360);
283 if (segments <= 0) segments = minSegments;
286 float stepLength = (endAngle - startAngle)/(
float)segments;
287 float angle = startAngle;
289#if defined(SUPPORT_QUADS_DRAW_MODE)
296 for (
int i = 0; i < segments/2; i++)
312 angle += (stepLength*2);
339 for (
int i = 0; i < segments; i++)
356 if (radius <= 0.0f) radius = 0.1f;
359 if (endAngle < startAngle)
362 float tmp = startAngle;
363 startAngle = endAngle;
367 int minSegments = (int)ceilf((endAngle - startAngle)/90);
369 if (segments < minSegments)
373 segments = (int)((endAngle - startAngle)*ceilf(2*
PI/th)/360);
375 if (segments <= 0) segments = minSegments;
378 float stepLength = (endAngle - startAngle)/(
float)segments;
379 float angle = startAngle;
382 bool showCapLines =
true;
383 int limit = 2*(segments + 2);
384 if ((
int)(endAngle - startAngle)%360 == 0) { limit = 2*segments; showCapLines =
false; }
396 for (
int i = 0; i < segments; i++)
422 for (
int i = 0; i < 360; i += 10)
450 for (
int i = 0; i < 360; i += 10)
464 for (
int i = 0; i < 360; i += 10)
480 for (
int i = 0; i < 360; i += 10)
490void DrawRing(
Vector2 center,
float innerRadius,
float outerRadius,
float startAngle,
float endAngle,
int segments,
Color color)
492 if (startAngle == endAngle)
return;
495 if (outerRadius < innerRadius)
497 float tmp = outerRadius;
498 outerRadius = innerRadius;
501 if (outerRadius <= 0.0f) outerRadius = 0.1f;
505 if (endAngle < startAngle)
508 float tmp = startAngle;
509 startAngle = endAngle;
513 int minSegments = (int)ceilf((endAngle - startAngle)/90);
515 if (segments < minSegments)
519 segments = (int)((endAngle - startAngle)*ceilf(2*
PI/th)/360);
521 if (segments <= 0) segments = minSegments;
525 if (innerRadius <= 0.0f)
527 DrawCircleSector(center, outerRadius, startAngle, endAngle, segments, color);
531 float stepLength = (endAngle - startAngle)/(
float)segments;
532 float angle = startAngle;
534#if defined(SUPPORT_QUADS_DRAW_MODE)
540 for (
int i = 0; i < segments; i++)
551 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
554 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
565 for (
int i = 0; i < segments; i++)
571 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
573 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
575 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
586 if (startAngle == endAngle)
return;
589 if (outerRadius < innerRadius)
591 float tmp = outerRadius;
592 outerRadius = innerRadius;
595 if (outerRadius <= 0.0f) outerRadius = 0.1f;
599 if (endAngle < startAngle)
602 float tmp = startAngle;
603 startAngle = endAngle;
607 int minSegments = (int)ceilf((endAngle - startAngle)/90);
609 if (segments < minSegments)
613 segments = (int)((endAngle - startAngle)*ceilf(2*
PI/th)/360);
615 if (segments <= 0) segments = minSegments;
618 if (innerRadius <= 0.0f)
624 float stepLength = (endAngle - startAngle)/(
float)segments;
625 float angle = startAngle;
627 bool showCapLines =
true;
628 int limit = 4*(segments + 1);
629 if ((
int)(endAngle - startAngle)%360 == 0) { limit = 4*segments; showCapLines =
false; }
641 for (
int i = 0; i < segments; i++)
646 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
649 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
691 if (rotation == 0.0f)
693 float x = rec.
x - origin.
x;
694 float y = rec.
y - origin.
y;
702 float sinRotation = sinf(rotation*
DEG2RAD);
703 float cosRotation = cosf(rotation*
DEG2RAD);
706 float dx = -origin.
x;
707 float dy = -origin.
y;
709 topLeft.
x = x + dx*cosRotation - dy*sinRotation;
710 topLeft.
y = y + dx*sinRotation + dy*cosRotation;
712 topRight.
x = x + (dx + rec.
width)*cosRotation - dy*sinRotation;
713 topRight.
y = y + (dx + rec.
width)*sinRotation + dy*cosRotation;
715 bottomLeft.
x = x + dx*cosRotation - (dy + rec.
height)*sinRotation;
716 bottomLeft.
y = y + dx*sinRotation + (dy + rec.
height)*cosRotation;
718 bottomRight.
x = x + (dx + rec.
width)*cosRotation - (dy + rec.
height)*sinRotation;
719 bottomRight.
y = y + (dx + rec.
width)*sinRotation + (dy + rec.
height)*cosRotation;
722#if defined(SUPPORT_QUADS_DRAW_MODE)
818#if defined(SUPPORT_QUADS_DRAW_MODE)
820 DrawRectangle(posX + width - 1, posY + 1, 1, height - 2, color);
844 if ((lineThick > rec.
width) || (lineThick > rec.
height))
863 Rectangle left = { rec.
x, rec.
y + lineThick, lineThick, rec.
height - lineThick*2.0f };
864 Rectangle right = { rec.
x - lineThick + rec.
width, rec.
y + lineThick, lineThick, rec.
height - lineThick*2.0f };
876 if ((roundness <= 0.0f) || (rec.
width < 1) || (rec.
height < 1 ))
882 if (roundness >= 1.0f) roundness = 1.0f;
886 if (radius <= 0.0f)
return;
893 segments = (int)(ceilf(2*
PI/th)/4.0f);
894 if (segments <= 0) segments = 4;
897 float stepLength = 90.0f/(float)segments;
917 {(float)rec.
x + radius, rec.
y}, {(float)(rec.
x + rec.
width) - radius, rec.
y}, { rec.
x + rec.
width, (float)rec.
y + radius },
919 {(float)rec.
x + radius, rec.
y + rec.
height}, { rec.
x, (float)(rec.
y + rec.
height) - radius}, {rec.
x, (float)rec.
y + radius},
920 {(float)rec.
x + radius, (
float)rec.
y + radius}, {(float)(rec.
x + rec.
width) - radius, (float)rec.
y + radius},
921 {(float)(rec.
x + rec.
width) - radius, (float)(rec.
y + rec.
height) - radius}, {(float)rec.
x + radius, (
float)(rec.
y + rec.
height) - radius}
924 const Vector2 centers[4] = { point[8], point[9], point[10], point[11] };
925 const float angles[4] = { 180.0f, 90.0f, 0.0f, 270.0f };
927#if defined(SUPPORT_QUADS_DRAW_MODE)
934 for (
int k = 0; k < 4; ++k)
936 float angle = angles[k];
937 const Vector2 center = centers[k];
940 for (
int i = 0; i < segments/2; i++)
951 angle += (stepLength*2);
1032 for (
int k = 0; k < 4; ++k)
1034 float angle = angles[k];
1035 const Vector2 center = centers[k];
1036 for (
int i = 0; i < segments; i++)
1042 angle += stepLength;
1097 if (lineThick < 0) lineThick = 0;
1100 if (roundness <= 0.0f)
1106 if (roundness >= 1.0f) roundness = 1.0f;
1110 if (radius <= 0.0f)
return;
1117 segments = (int)(ceilf(2*
PI/th)/2.0f);
1118 if (segments <= 0) segments = 4;
1121 float stepLength = 90.0f/(float)segments;
1122 const float outerRadius = radius + lineThick, innerRadius = radius;
1141 {(float)rec.
x + innerRadius, rec.
y - lineThick}, {(float)(rec.
x + rec.
width) - innerRadius, rec.
y - lineThick}, { rec.
x + rec.
width + lineThick, (float)rec.
y + innerRadius },
1142 {rec.
x + rec.
width + lineThick, (float)(rec.
y + rec.
height) - innerRadius}, {(float)(rec.
x + rec.
width) - innerRadius, rec.
y + rec.
height + lineThick},
1143 {(float)rec.
x + innerRadius, rec.
y + rec.
height + lineThick}, { rec.
x - lineThick, (float)(rec.
y + rec.
height) - innerRadius}, {rec.
x - lineThick, (float)rec.
y + innerRadius},
1144 {(float)rec.
x + innerRadius, rec.
y}, {(float)(rec.
x + rec.
width) - innerRadius, rec.
y},
1145 { rec.
x + rec.
width, (float)rec.
y + innerRadius }, {rec.
x + rec.
width, (float)(rec.
y + rec.
height) - innerRadius},
1146 {(float)(rec.
x + rec.
width) - innerRadius, rec.
y + rec.
height}, {(float)rec.
x + innerRadius, rec.
y + rec.
height},
1147 { rec.
x, (float)(rec.
y + rec.
height) - innerRadius}, {rec.
x, (float)rec.
y + innerRadius}
1151 {(float)rec.
x + innerRadius, (
float)rec.
y + innerRadius}, {(float)(rec.
x + rec.
width) - innerRadius, (float)rec.
y + innerRadius},
1152 {(float)(rec.
x + rec.
width) - innerRadius, (float)(rec.
y + rec.
height) - innerRadius}, {(float)rec.
x + innerRadius, (
float)(rec.
y + rec.
height) - innerRadius}
1155 const float angles[4] = { 180.0f, 90.0f, 0.0f, 270.0f };
1159#if defined(SUPPORT_QUADS_DRAW_MODE)
1167 for (
int k = 0; k < 4; ++k)
1169 float angle = angles[k];
1170 const Vector2 center = centers[k];
1171 for (
int i = 0; i < segments; i++)
1179 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
1181 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
1183 angle += stepLength;
1239 for (
int k = 0; k < 4; ++k)
1241 float angle = angles[k];
1242 const Vector2 center = centers[k];
1244 for (
int i = 0; i < segments; i++)
1250 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
1252 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*innerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*innerRadius);
1254 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
1256 angle += stepLength;
1306 for (
int k = 0; k < 4; ++k)
1308 float angle = angles[k];
1309 const Vector2 center = centers[k];
1311 for (
int i = 0; i < segments; i++)
1315 rlVertex2f(center.
x + sinf(
DEG2RAD*(angle + stepLength))*outerRadius, center.
y + cosf(
DEG2RAD*(angle + stepLength))*outerRadius);
1316 angle += stepLength;
1321 for (
int i = 0; i < 8; i += 2)
1336#if defined(SUPPORT_QUADS_DRAW_MODE)
1394 if (pointCount >= 3)
1402 for (
int i = 1; i < pointCount - 1; i++)
1411 rlVertex2f(points[i + 1].x, points[i + 1].y);
1414 rlVertex2f(points[i + 1].x, points[i + 1].y);
1425 if (pointCount >= 3)
1432 for (
int i = 2; i < pointCount; i++)
1437 rlVertex2f(points[i - 2].x, points[i - 2].y);
1438 rlVertex2f(points[i - 1].x, points[i - 1].y);
1443 rlVertex2f(points[i - 1].x, points[i - 1].y);
1444 rlVertex2f(points[i - 2].x, points[i - 2].y);
1454 if (sides < 3) sides = 3;
1455 float centralAngle = 0.0f;
1457#if defined(SUPPORT_QUADS_DRAW_MODE)
1467#if defined(SUPPORT_QUADS_DRAW_MODE)
1471 for (
int i = 0; i < sides; i++)
1484 centralAngle += 360.0f/(float)sides;
1492 for (
int i = 0; i < sides; i++)
1499 centralAngle += 360.0f/(float)sides;
1510 if (sides < 3) sides = 3;
1511 float centralAngle = 0.0f;
1520 for (
int i = 0; i < sides; i++)
1525 centralAngle += 360.0f/(float)sides;
1534 if (sides < 3) sides = 3;
1535 float centralAngle = 0.0f;
1536 float exteriorAngle = 360.0f/(float)sides;
1537 float innerRadius = radius - (lineThick*cosf(
DEG2RAD*exteriorAngle/2.0f));
1539#if defined(SUPPORT_QUADS_DRAW_MODE)
1549#if defined(SUPPORT_QUADS_DRAW_MODE)
1553 for (
int i = 0; i < sides; i++)
1563 centralAngle += exteriorAngle;
1574 for (
int i = 0; i < sides; i++)
1577 float nextAngle = centralAngle + exteriorAngle;
1587 centralAngle = nextAngle;
1601 bool collision =
false;
1603 if ((point.
x >= rec.
x) && (point.
x <= (rec.
x + rec.
width)) && (point.
y >= rec.
y) && (point.
y <= (rec.
y + rec.
height))) collision =
true;
1611 bool collision =
false;
1621 bool collision =
false;
1623 float alpha = ((p2.
y - p3.
y)*(point.
x - p3.
x) + (p3.
x - p2.
x)*(point.
y - p3.
y)) /
1624 ((p2.
y - p3.
y)*(p1.
x - p3.
x) + (p3.
x - p2.
x)*(p1.
y - p3.
y));
1626 float beta = ((p3.
y - p1.
y)*(point.
x - p3.
x) + (p1.
x - p3.
x)*(point.
y - p3.
y)) /
1627 ((p2.
y - p3.
y)*(p1.
x - p3.
x) + (p3.
x - p2.
x)*(p1.
y - p3.
y));
1629 float gamma = 1.0f - alpha - beta;
1631 if ((alpha > 0) && (beta > 0) && (gamma > 0)) collision =
true;
1639 bool collision =
false;
1641 if ((rec1.
x < (rec2.
x + rec2.
width) && (rec1.
x + rec1.
width) > rec2.
x) &&
1642 (rec1.
y < (rec2.
y + rec2.
height) && (rec1.
y + rec1.
height) > rec2.
y)) collision =
true;
1650 bool collision =
false;
1652 float dx = center2.
x - center1.
x;
1653 float dy = center2.
y - center1.
y;
1655 float distance = sqrtf(dx*dx + dy*dy);
1657 if (distance <= (radius1 + radius2)) collision =
true;
1666 bool collision =
false;
1668 int recCenterX = (int)(rec.
x + rec.
width/2.0f);
1669 int recCenterY = (int)(rec.
y + rec.
height/2.0f);
1671 float dx = fabsf(center.
x - (
float)recCenterX);
1672 float dy = fabsf(center.
y - (
float)recCenterY);
1674 if (dx > (rec.
width/2.0f + radius)) {
return false; }
1675 if (dy > (rec.
height/2.0f + radius)) {
return false; }
1677 if (dx <= (rec.
width/2.0f)) {
return true; }
1678 if (dy <= (rec.
height/2.0f)) {
return true; }
1680 float cornerDistanceSq = (dx - rec.
width/2.0f)*(dx - rec.
width/2.0f) +
1683 collision = (cornerDistanceSq <= (radius*radius));
1691 bool collision =
false;
1693 float div = (endPos2.
y - startPos2.
y)*(endPos1.
x - startPos1.
x) - (endPos2.
x - startPos2.
x)*(endPos1.
y - startPos1.
y);
1695 if (fabsf(div) >= FLT_EPSILON)
1699 float xi = ((startPos2.
x - endPos2.
x)*(startPos1.
x*endPos1.
y - startPos1.
y*endPos1.
x) - (startPos1.
x - endPos1.
x)*(startPos2.
x*endPos2.
y - startPos2.
y*endPos2.
x))/div;
1700 float yi = ((startPos2.
y - endPos2.
y)*(startPos1.
x*endPos1.
y - startPos1.
y*endPos1.
x) - (startPos1.
y - endPos1.
y)*(startPos2.
x*endPos2.
y - startPos2.
y*endPos2.
x))/div;
1702 if (((fabsf(startPos1.
x - endPos1.
x) > FLT_EPSILON) && (xi < fminf(startPos1.
x, endPos1.
x) || (xi > fmaxf(startPos1.
x, endPos1.
x)))) ||
1703 ((fabsf(startPos2.
x - endPos2.
x) > FLT_EPSILON) && (xi < fminf(startPos2.
x, endPos2.
x) || (xi > fmaxf(startPos2.
x, endPos2.
x)))) ||
1704 ((fabsf(startPos1.
y - endPos1.
y) > FLT_EPSILON) && (yi < fminf(startPos1.
y, endPos1.
y) || (yi > fmaxf(startPos1.
y, endPos1.
y)))) ||
1705 ((fabsf(startPos2.
y - endPos2.
y) > FLT_EPSILON) && (yi < fminf(startPos2.
y, endPos2.
y) || (yi > fmaxf(startPos2.
y, endPos2.
y))))) collision =
false;
1707 if (collision && (collisionPoint != 0))
1709 collisionPoint->
x = xi;
1710 collisionPoint->
y = yi;
1720 bool collision =
false;
1722 float dxc = point.
x - p1.
x;
1723 float dyc = point.
y - p1.
y;
1724 float dxl = p2.
x - p1.
x;
1725 float dyl = p2.
y - p1.
y;
1726 float cross = dxc*dyl - dyc*dxl;
1728 if (fabsf(cross) < (threshold*fmaxf(fabsf(dxl), fabsf(dyl))))
1730 if (fabsf(dxl) >= fabsf(dyl)) collision = (dxl > 0)? ((p1.
x <= point.
x) && (point.
x <= p2.
x)) : ((p2.
x <= point.
x) && (point.
x <= p1.
x));
1731 else collision = (dyl > 0)? ((p1.
y <= point.
y) && (point.
y <= p2.
y)) : ((p2.
y <= point.
y) && (point.
y <= p1.
y));
1744 float dxx = fabsf(rec1.
x - rec2.
x);
1745 float dyy = fabsf(rec1.
y - rec2.
y);
1747 if (rec1.
x <= rec2.
x)
1749 if (rec1.
y <= rec2.
y)
1766 if (rec1.
y <= rec2.
y)
1812 if ((t /= 0.5f*d) < 1)
return 0.5f*c*t*t*t + b;
1816 return 0.5f*c*(t*t*t + 2.0f) + b;
EASEDEF float EaseCubicInOut(float t, float b, float c, float d)
RLAPI void rlNormal3f(float x, float y, float z)
RLAPI void rlColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
RLAPI void rlVertex2i(int x, int y)
RLAPI void rlPushMatrix(void)
RLAPI void rlVertex2f(float x, float y)
RLAPI void rlBegin(int mode)
RLAPI void rlTexCoord2f(float x, float y)
RLAPI void rlRotatef(float angle, float x, float y, float z)
RLAPI void rlPopMatrix(void)
RLAPI void rlSetTexture(unsigned int id)
RLAPI bool rlCheckRenderBatchLimit(int vCount)
RLAPI void rlTranslatef(float x, float y, float z)
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color)
bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2)
void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color)
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color)
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
void DrawTriangleStrip(Vector2 *points, int pointCount, Color color)
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2)
void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color)
void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
void DrawPixel(int posX, int posY, Color color)
void DrawPixelV(Vector2 position, Color color)
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
void DrawCircleV(Vector2 center, float radius, Color color)
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2)
void DrawRectangleRec(Rectangle rec, Color color)
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3)
void DrawTriangleFan(Vector2 *points, int pointCount, Color color)
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color)
void SetShapesTexture(Texture2D texture, Rectangle source)
void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color)
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2)
bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint)
void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color)
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color)
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color)
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4)
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius)
void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color)
bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold)
void DrawRectangle(int posX, int posY, int width, int height, Color color)
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color)
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color)
void DrawCircleLines(int centerX, int centerY, float radius, Color color)
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
#define SMOOTH_CIRCLE_ERROR_RATE
rshapes - Basic functions to draw 2d shapes and check collisions
bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color)
bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
void DrawRectangleV(Vector2 position, Vector2 size, Color color)
#define BEZIER_LINE_DIVISIONS
void DrawCircle(int centerX, int centerY, float radius, Color color)
void DrawLineStrip(Vector2 *points, int pointCount, Color color)