25 Commits

Author SHA1 Message Date
Ray
9bd3d84f3d Update models_basic_voxel.c 2026-06-07 22:59:20 +02:00
Ray
04b66f1965 Merge branch 'master' of https://github.com/raysan5/raylib 2026-06-07 22:54:16 +02:00
Ray
7c1b9d0a32 Update textures_image_drawing.c 2026-06-07 22:53:36 +02:00
02869da279 rlparser: update raylib_api.* by CI 2026-06-07 19:53:22 +00:00
Ray
aebfd788c7 WARNING: BREAKING: REDESIGNED: ImageDraw() API, align with DrawTexture() 2026-06-07 21:53:07 +02:00
26d82cf55d rlparser: update raylib_api.* by CI 2026-06-07 19:51:18 +00:00
Ray
d9335f6a95 ADDED: TODO: ImageDrawCircleGradient() 2026-06-07 21:51:02 +02:00
0e7cc36567 rlparser: update raylib_api.* by CI 2026-06-07 19:29:40 +00:00
Ray
e57663c937 Update raylib.h 2026-06-07 21:29:26 +02:00
23433fe2dc rlparser: update raylib_api.* by CI 2026-06-07 19:29:06 +00:00
Ray
fefb9f4428 Merge branch 'master' of https://github.com/raysan5/raylib 2026-06-07 21:27:07 +02:00
Ray
68c4b8a60f Removed old compatibility hack 2026-06-07 21:26:59 +02:00
33b6f0f3a4 rlparser: update raylib_api.* by CI 2026-06-07 19:26:49 +00:00
Ray
ca0ba55050 Reviewed parameter names, added comment about order 2026-06-07 21:26:32 +02:00
Ray
236618f87b Reorder functions by drawing vertex/sides 2026-06-07 21:06:53 +02:00
f5ea52a2b8 rlparser: update raylib_api.* by CI 2026-06-07 16:49:09 +00:00
Ray
6a6daad739 Merge branch 'master' of https://github.com/raysan5/raylib 2026-06-07 18:48:50 +02:00
Ray
4724e5fec3 ADDED: ImageDrawLineStrip() 2026-06-07 18:48:41 +02:00
Ray
d3d1b0cbcc ADDED: DrawCircleLinesEx(), simpler naming than DrawRing() 2026-06-07 18:48:16 +02:00
20aa6cb764 rlparser: update raylib_api.* by CI 2026-06-07 16:47:29 +00:00
Ray
a41bb7c07a Reorder shapes drawing API functions by number of vertices
NOTE: Consistency between shapes and Image drawing functionality is being aligned (as much as possible)
2026-06-07 18:47:14 +02:00
Ray
53ccae09cc Merge branch 'master' of https://github.com/raysan5/raylib 2026-06-07 18:43:00 +02:00
Ray
869251e590 REVIEWED: Parameter name, shorter 2026-06-07 18:42:50 +02:00
45f1af2bde rlparser: update raylib_api.* by CI 2026-06-07 16:42:02 +00:00
Ray
15d25242be REVIEWED: Comments to be more descriptive 2026-06-07 18:41:44 +02:00
11 changed files with 2859 additions and 2559 deletions

View File

@ -77,7 +77,7 @@ int main(void)
{ {
// Cast a ray from the screen center (where crosshair would be) // Cast a ray from the screen center (where crosshair would be)
Vector2 screenCenter = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f }; Vector2 screenCenter = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f };
Ray ray = GetMouseRay(screenCenter, camera); Ray ray = GetScreenToWorldRay(screenCenter, camera);
// Check ray collision with all voxels // Check ray collision with all voxels
float closestDistance = 99999.0f; float closestDistance = 99999.0f;

View File

@ -39,7 +39,8 @@ int main(void)
Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM)
// Draw one image over the other with a scaling of 1.5f // Draw one image over the other with a scaling of 1.5f
ImageDraw(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE); ImageDrawImagePro(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height },
(Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, (Vector2){ 0 }, 0.0f, WHITE);
ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image
// Draw on the image with a few image draw methods // Draw on the image with a few image draw methods

View File

@ -1080,7 +1080,6 @@ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture)
RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM)
// Screen-space-related functions // Screen-space-related functions
#define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions
RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse) RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get screen space position for a 3d world space position RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get screen space position for a 3d world space position
@ -1280,6 +1279,26 @@ RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color
RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines) RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); // Draw a dashed line
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle, counter-clockwise vertex order
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors, counter-clockwise vertex/color order
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline, counter-clockwise vertex order
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
RLAPI void DrawRectangleLinesEx(Rectangle rec, float thick, Color color); // Draw rectangle outline with line thickness
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float thick, Color color); // Draw rectangle lines with rounded edges outline and line thickness
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon of n sides
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float thick, Color color); // Draw a polygon outline of n sides with line thickness
RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle
@ -1287,32 +1306,13 @@ RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, floa
RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version) RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
RLAPI void DrawCircleLinesEx(Vector2 center, float radius, float thick, Color color); // Draw circle outline with line thickness
RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse (Vector version) RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse (Vector version)
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version) RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); // Draw ellipse outline (Vector version)
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); // Draw a vertical-gradient-filled rectangle
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); // Draw a horizontal-gradient-filled rectangle
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight); // Draw a gradient-filled rectangle with custom vertex colors
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle lines with rounded edges outline
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors (vertex in counter-clockwise order!)
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon of n sides
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
// Splines drawing functions // Splines drawing functions
RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
@ -1422,21 +1422,26 @@ RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color);
RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version) RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
RLAPI void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image RLAPI void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image RLAPI void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a lines sequence within an image
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
RLAPI void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle lines within an image
RLAPI void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image with extended parameters
RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image
RLAPI void ImageDrawTriangleGradient(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image RLAPI void ImageDrawTriangleGradient(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image
RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image
RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center) RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points within an image (first vertex is the center)
RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points within an image
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
RLAPI void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle lines within an image
RLAPI void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image with line thickness
RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
RLAPI void ImageDrawCircleGradient(Image *dst, Vector2 center, float radius, Color inner, Color outer); // Draw a gradient-filled circle within an image
RLAPI void ImageDrawImage(Image *dst, Image src, int posX, int posY, Color tint); // Draw an image within an image
RLAPI void ImageDrawImageRec(Image *dst, Image src, Rectangle srcRec, Vector2 position, Color tint); // Draw a part of an image defined by a rectangle within an image
RLAPI void ImageDrawImagePro(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Vector2 origin, float rotation, Color tint); // Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
@ -1461,7 +1466,7 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap);
// Texture drawing functions // Texture drawing functions
RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2 RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with rotation and scale
RLAPI void DrawTextureRec(Texture2D texture, Rectangle rec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle RLAPI void DrawTextureRec(Texture2D texture, Rectangle rec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
RLAPI void DrawTexturePro(Texture2D texture, Rectangle srcrec, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a source rectangle to destination rectangle, with scaling and rotation RLAPI void DrawTexturePro(Texture2D texture, Rectangle srcrec, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a source rectangle to destination rectangle, with scaling and rotation
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a texture (or part of it) that stretches or shrinks nicely RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dstrec, Vector2 origin, float rotation, Color tint); // Draw a texture (or part of it) that stretches or shrinks nicely
@ -1492,7 +1497,7 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G
// Font loading/unloading functions // Font loading/unloading functions
RLAPI Font GetFontDefault(void); // Get the default Font RLAPI Font GetFontDefault(void); // Get the default Font
RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM) RLAPI Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style) RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
RLAPI bool IsFontValid(Font font); // Check if font is valid (font data loaded, WARNING: GPU texture not checked) RLAPI bool IsFontValid(Font font); // Check if font is valid (font data loaded, WARNING: GPU texture not checked)
@ -1568,14 +1573,14 @@ RLAPI float TextToFloat(const char *text);
RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line RLAPI void DrawPoint3D(Vector3 position, Color color); // Draw a point in 3D space, actually a small line
RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space
RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!) RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); // Draw a color-filled triangle, counter-clockwise vertex order
RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); // Draw a triangle strip defined by points
RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube
RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version) RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version) RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with defined rings and slices
RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int sides, Color color); // Draw a cylinder/cone RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int sides, Color color); // Draw a cylinder/cone
RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
@ -1600,9 +1605,9 @@ RLAPI BoundingBox GetModelBoundingBox(Model model);
// Model drawing functions // Model drawing functions
RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with custom transform
RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set)
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires with custom transform
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a billboard texture
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle rec, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by rectangle RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle rec, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by rectangle

View File

@ -435,7 +435,7 @@ void DrawSphere(Vector3 centerPos, float radius, Color color)
DrawSphereEx(centerPos, radius, 16, 16, color); DrawSphereEx(centerPos, radius, 16, 16, color);
} }
// Draw sphere with extended parameters // Draw sphere with defined rings and slices
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color) void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color)
{ {
#if 0 #if 0
@ -3918,7 +3918,7 @@ void DrawModel(Model model, Vector3 position, float scale, Color tint)
DrawModelEx(model, position, rotationAxis, 0.0f, vScale, tint); DrawModelEx(model, position, rotationAxis, 0.0f, vScale, tint);
} }
// Draw a model with extended parameters // Draw a model with custom transform
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
{ {
// Calculate transformation matrix from function parameters // Calculate transformation matrix from function parameters
@ -3972,7 +3972,7 @@ void DrawModelWires(Model model, Vector3 position, float scale, Color tint)
rlDisableWireMode(); rlDisableWireMode();
} }
// Draw a model wires (with texture if set) with extended parameters // Draw a model wires with custom transform
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint) void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
{ {
rlEnableWireMode(); rlEnableWireMode();

File diff suppressed because it is too large Load Diff

View File

@ -327,7 +327,7 @@ extern void UnloadFontDefault(void)
defaultFont.recs = NULL; defaultFont.recs = NULL;
} }
// Get the default font, useful to be used with extended parameters // Get the default font
Font GetFontDefault() Font GetFontDefault()
{ {
return defaultFont; return defaultFont;
@ -381,9 +381,9 @@ Font LoadFont(const char *fileName)
return font; return font;
} }
// Load Font from TTF or BDF font file with generation parameters // Load font from file with defined codepoints and generation size
// NOTE: You can pass an array with desired characters, those characters should be available in the font // NOTE: NULL for codepoints and 0 for codepointCount to load the default character set (32..126),
// if array is NULL, default char set is selected 32..126 // font size is provided in pixels height
Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount) Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount)
{ {
Font font = { 0 }; Font font = { 0 };
@ -2673,7 +2673,7 @@ static Font LoadBMFont(const char *fileName)
{ {
Rectangle srcRec = { 0.0f, 0.0f, (float)imWidth, (float)imHeight }; Rectangle srcRec = { 0.0f, 0.0f, (float)imWidth, (float)imHeight };
Rectangle dstRec = { 0.0f, (float)imHeight*(float)i, (float)imWidth, (float)imHeight }; Rectangle dstRec = { 0.0f, (float)imHeight*(float)i, (float)imWidth, (float)imHeight };
ImageDraw(&fullFont, imFonts[i], srcRec, dstRec, WHITE); ImageDrawImagePro(&fullFont, imFonts[i], srcRec, dstRec, (Vector2){ 0 }, 0.0f, WHITE);
} }
} }

View File

@ -1500,7 +1500,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
if ((codepoint != ' ') && (codepoint != '\t')) if ((codepoint != ' ') && (codepoint != '\t'))
{ {
Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height };
ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint); ImageDrawImagePro(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height },
rec, (Vector2){ 0 }, 0.0f, tint);
} }
if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing); if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing);
@ -3609,142 +3610,13 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co
} }
} }
// Draw circle within an image // Draw a lines sequence within an image
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color) void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color)
{ {
int x = 0; for (int i = 0; i < pointCount - 1; i++)
int y = radius;
int decesionParameter = 3 - 2*radius;
while (y >= x)
{ {
ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color); ImageDrawLineV(dst, points[i], points[i + 1], color);
ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
x++;
if (decesionParameter > 0)
{
y--;
decesionParameter = decesionParameter + 4*(x - y) + 10;
} }
else decesionParameter = decesionParameter + 4*x + 6;
}
}
// Draw circle within an image (Vector version)
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
{
ImageDrawCircle(dst, (int)center.x, (int)center.y, radius, color);
}
// Draw circle outline within an image
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
{
int x = 0;
int y = radius;
int decesionParameter = 3 - 2*radius;
while (y >= x)
{
ImageDrawPixel(dst, centerX + x, centerY + y, color);
ImageDrawPixel(dst, centerX - x, centerY + y, color);
ImageDrawPixel(dst, centerX + x, centerY - y, color);
ImageDrawPixel(dst, centerX - x, centerY - y, color);
ImageDrawPixel(dst, centerX + y, centerY + x, color);
ImageDrawPixel(dst, centerX - y, centerY + x, color);
ImageDrawPixel(dst, centerX + y, centerY - x, color);
ImageDrawPixel(dst, centerX - y, centerY - x, color);
x++;
if (decesionParameter > 0)
{
y--;
decesionParameter = decesionParameter + 4*(x - y) + 10;
}
else decesionParameter = decesionParameter + 4*x + 6;
}
}
// Draw circle outline within an image (Vector version)
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color)
{
ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color);
}
// Draw rectangle within an image
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
{
ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
}
// Draw rectangle within an image (Vector version)
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
{
ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
}
// Draw rectangle within an image
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Security check to avoid drawing out of bounds in case of bad user data
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
if (rec.width < 0) rec.width = 0;
if (rec.height < 0) rec.height = 0;
// Clamp the size the the image bounds
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
// Check if the rect is even inside the image
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
int sy = (int)rec.y;
int sx = (int)rec.x;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Fill in the first pixel of the first row based on image format
ImageDrawPixel(dst, sx, sy, color);
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
// Repeat the first pixel data throughout the row
for (int x = 1; x < (int)rec.width; x *= 2)
{
int pixelsToCopy = MIN(x, (int)rec.width - x);
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, pixelsToCopy*bytesPerPixel);
}
// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel*(int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}
}
// Draw rectangle lines within an image
void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color)
{
Rectangle rec = { posX, posY, width, height };
ImageDrawRectangleLinesEx(dst, rec, 1, color);
}
// Draw rectangle lines within an image with extended parameters
void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color)
{
ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
} }
// Draw triangle within an image // Draw triangle within an image
@ -3932,9 +3804,169 @@ void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, C
} }
} }
// Draw an image (source) within an image (destination) // Draw rectangle within an image
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
{
ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
}
// Draw rectangle within an image (Vector version)
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
{
ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
}
// Draw rectangle within an image
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Security check to avoid drawing out of bounds in case of bad user data
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
if (rec.width < 0) rec.width = 0;
if (rec.height < 0) rec.height = 0;
// Clamp the size the the image bounds
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
// Check if the rect is even inside the image
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
int sy = (int)rec.y;
int sx = (int)rec.x;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Fill in the first pixel of the first row based on image format
ImageDrawPixel(dst, sx, sy, color);
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
// Repeat the first pixel data throughout the row
for (int x = 1; x < (int)rec.width; x *= 2)
{
int pixelsToCopy = MIN(x, (int)rec.width - x);
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, pixelsToCopy*bytesPerPixel);
}
// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel*(int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}
}
// Draw rectangle lines within an image
void ImageDrawRectangleLines(Image *dst, int posX, int posY, int width, int height, Color color)
{
Rectangle rec = { posX, posY, width, height };
ImageDrawRectangleLinesEx(dst, rec, 1, color);
}
// Draw rectangle lines within an image with line thickness
void ImageDrawRectangleLinesEx(Image *dst, Rectangle rec, int thick, Color color)
{
ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
}
// Draw circle within an image
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
{
int x = 0;
int y = radius;
int decesionParameter = 3 - 2*radius;
while (y >= x)
{
ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color);
ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
x++;
if (decesionParameter > 0)
{
y--;
decesionParameter = decesionParameter + 4*(x - y) + 10;
}
else decesionParameter = decesionParameter + 4*x + 6;
}
}
// Draw circle within an image (Vector version)
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
{
ImageDrawCircle(dst, (int)center.x, (int)center.y, radius, color);
}
// Draw circle outline within an image
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
{
int x = 0;
int y = radius;
int decesionParameter = 3 - 2*radius;
while (y >= x)
{
ImageDrawPixel(dst, centerX + x, centerY + y, color);
ImageDrawPixel(dst, centerX - x, centerY + y, color);
ImageDrawPixel(dst, centerX + x, centerY - y, color);
ImageDrawPixel(dst, centerX - x, centerY - y, color);
ImageDrawPixel(dst, centerX + y, centerY + x, color);
ImageDrawPixel(dst, centerX - y, centerY + x, color);
ImageDrawPixel(dst, centerX + y, centerY - x, color);
ImageDrawPixel(dst, centerX - y, centerY - x, color);
x++;
if (decesionParameter > 0)
{
y--;
decesionParameter = decesionParameter + 4*(x - y) + 10;
}
else decesionParameter = decesionParameter + 4*x + 6;
}
}
// Draw circle outline within an image (Vector version)
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color)
{
ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color);
}
// Draw a gradient-filled circle within an image
void ImageDrawCircleGradient(Image *dst, Vector2 center, float radius, Color inner, Color outer)
{
// TODO: Implement gradient circle drawing
}
// Draw an image within an image
void ImageDrawImage(Image *dst, Image src, int posX, int posY, Color tint)
{
Rectangle srcRec = { 0, 0, src.width, src.height };
Rectangle dstRec = { posX, posY, srcRec.width, srcRec.height };
ImageDrawImagePro(dst, src, srcRec, dstRec, (Vector2){ 0 }, 0.0f, tint);
}
// Draw a part of an image defined by a rectangle within an image
void ImageDrawImageRec(Image *dst, Image src, Rectangle srcRec, Vector2 position, Color tint)
{
Rectangle dstRec = { position.x, position.y, srcRec.width, srcRec.height };
ImageDrawImagePro(dst, src, srcRec, dstRec, (Vector2){ 0 }, 0.0f, tint);
}
// Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image
// NOTE: Color tint is applied to source image // NOTE: Color tint is applied to source image
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint) // TODO: WARNING: origin and rotation are not implemented
void ImageDrawImagePro(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Vector2 origin, float rotation, Color tint)
{ {
// Security check to avoid program crash // Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) || if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) ||
@ -3995,7 +4027,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
// [x] Consider fast path: no alpha blending required cases (src has no alpha) // [x] Consider fast path: no alpha blending required cases (src has no alpha)
// [x] Consider fast path: same src/dst format with no alpha -> direct line copy // [x] Consider fast path: same src/dst format with no alpha -> direct line copy
// [-] GetPixelColor(): Get Vector4 instead of Color, easier for ColorAlphaBlend() // [-] GetPixelColor(): Get Vector4 instead of Color, easier for ColorAlphaBlend()
// [ ] TODO: Support 16bit and 32bit (float) channels drawing // [-] Support 16bit and 32bit (float) channels drawing
Color colSrc = { 0 }; Color colSrc = { 0 };
Color colDst = { 0 }; Color colDst = { 0 };
@ -4079,7 +4111,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
mipmapDstRec.x /= 2; mipmapDstRec.x /= 2;
mipmapDstRec.y /= 2; mipmapDstRec.y /= 2;
ImageDraw(&mipmapDst, mipmapSrc, mipmapSrcRec, mipmapDstRec, tint); ImageDrawImagePro(&mipmapDst, mipmapSrc, mipmapSrcRec, mipmapDstRec, (Vector2){ 0 }, 0.0f, tint);
} }
} }
} }
@ -4106,7 +4138,7 @@ void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position,
Rectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height }; Rectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height };
Rectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height }; Rectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height };
ImageDraw(dst, imText, srcRec, dstRec, WHITE); ImageDrawImagePro(dst, imText, srcRec, dstRec, (Vector2){ 0 }, 0.0f, WHITE);
UnloadImage(imText); UnloadImage(imText);
} }
@ -4232,7 +4264,7 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
ImageMipmaps(&faces); ImageMipmaps(&faces);
} }
for (int i = 0; i < 6; i++) ImageDraw(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE); for (int i = 0; i < 6; i++) ImageDrawImagePro(&faces, mipmapped, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, (Vector2){ 0 }, 0.0f, WHITE);
UnloadImage(mipmapped); UnloadImage(mipmapped);
} }
@ -4488,7 +4520,7 @@ void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
DrawTextureEx(texture, position, 0, 1.0f, tint); DrawTextureEx(texture, position, 0, 1.0f, tint);
} }
// Draw a texture with extended parameters // Draw a texture with rotation and scale
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint) void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
{ {
Rectangle srcrec = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; Rectangle srcrec = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };

File diff suppressed because it is too large Load Diff

View File

@ -335,12 +335,6 @@ return {
type = "UNKNOWN", type = "UNKNOWN",
value = "SHADER_LOC_MAP_METALNESS", value = "SHADER_LOC_MAP_METALNESS",
description = "" description = ""
},
{
name = "GetMouseRay",
type = "UNKNOWN",
value = "GetScreenToWorldRay",
description = "Compatibility hack for previous raylib versions"
} }
}, },
structs = { structs = {
@ -4850,6 +4844,234 @@ return {
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
{
name = "DrawTriangle",
description = "Draw a color-filled triangle, counter-clockwise vertex order",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleGradient",
description = "Draw triangle with interpolated colors, counter-clockwise vertex/color order",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "c1"},
{type = "Color", name = "c2"},
{type = "Color", name = "c3"}
}
},
{
name = "DrawTriangleLines",
description = "Draw triangle outline, counter-clockwise vertex order",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleFan",
description = "Draw a triangle fan defined by points (first vertex is the center)",
returnType = "void",
params = {
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleStrip",
description = "Draw a triangle strip defined by points",
returnType = "void",
params = {
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangle",
description = "Draw a color-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleV",
description = "Draw a color-filled rectangle (Vector version)",
returnType = "void",
params = {
{type = "Vector2", name = "position"},
{type = "Vector2", name = "size"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRec",
description = "Draw a color-filled rectangle",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectanglePro",
description = "Draw a color-filled rectangle with pro parameters",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Vector2", name = "origin"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleGradientV",
description = "Draw a vertical-gradient-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "top"},
{type = "Color", name = "bottom"}
}
},
{
name = "DrawRectangleGradientH",
description = "Draw a horizontal-gradient-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "left"},
{type = "Color", name = "right"}
}
},
{
name = "DrawRectangleGradientEx",
description = "Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Color", name = "col1"},
{type = "Color", name = "col2"},
{type = "Color", name = "col3"},
{type = "Color", name = "col4"}
}
},
{
name = "DrawRectangleLines",
description = "Draw rectangle outline",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleLinesEx",
description = "Draw rectangle outline with line thickness",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRounded",
description = "Draw rectangle with rounded edges",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRoundedLines",
description = "Draw rectangle lines with rounded edges",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRoundedLinesEx",
description = "Draw rectangle lines with rounded edges outline and line thickness",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPoly",
description = "Draw a polygon of n sides",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPolyLines",
description = "Draw a polygon outline of n sides",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPolyLinesEx",
description = "Draw a polygon outline of n sides with line thickness",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{ {
name = "DrawCircle", name = "DrawCircle",
description = "Draw a color-filled circle", description = "Draw a color-filled circle",
@ -4929,6 +5151,17 @@ return {
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
{
name = "DrawCircleLinesEx",
description = "Draw circle outline with line thickness",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "float", name = "radius"},
{type = "float", name = "thick"},
{type = "Color", name = "color"}
}
},
{ {
name = "DrawEllipse", name = "DrawEllipse",
description = "Draw ellipse", description = "Draw ellipse",
@ -5003,234 +5236,6 @@ return {
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
{
name = "DrawRectangle",
description = "Draw a color-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleV",
description = "Draw a color-filled rectangle (Vector version)",
returnType = "void",
params = {
{type = "Vector2", name = "position"},
{type = "Vector2", name = "size"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRec",
description = "Draw a color-filled rectangle",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectanglePro",
description = "Draw a color-filled rectangle with pro parameters",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Vector2", name = "origin"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleGradientV",
description = "Draw a vertical-gradient-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "top"},
{type = "Color", name = "bottom"}
}
},
{
name = "DrawRectangleGradientH",
description = "Draw a horizontal-gradient-filled rectangle",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "left"},
{type = "Color", name = "right"}
}
},
{
name = "DrawRectangleGradientEx",
description = "Draw a gradient-filled rectangle with custom vertex colors",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "Color", name = "topLeft"},
{type = "Color", name = "bottomLeft"},
{type = "Color", name = "bottomRight"},
{type = "Color", name = "topRight"}
}
},
{
name = "DrawRectangleLines",
description = "Draw rectangle outline",
returnType = "void",
params = {
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleLinesEx",
description = "Draw rectangle outline with extended parameters",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "lineThick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRounded",
description = "Draw rectangle with rounded edges",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRoundedLines",
description = "Draw rectangle lines with rounded edges",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "Color", name = "color"}
}
},
{
name = "DrawRectangleRoundedLinesEx",
description = "Draw rectangle lines with rounded edges outline",
returnType = "void",
params = {
{type = "Rectangle", name = "rec"},
{type = "float", name = "roundness"},
{type = "int", name = "segments"},
{type = "float", name = "lineThick"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangle",
description = "Draw a color-filled triangle (vertex in counter-clockwise order!)",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleGradient",
description = "Draw triangle with interpolated colors (vertex in counter-clockwise order!)",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "c1"},
{type = "Color", name = "c2"},
{type = "Color", name = "c3"}
}
},
{
name = "DrawTriangleLines",
description = "Draw triangle outline (vertex in counter-clockwise order!)",
returnType = "void",
params = {
{type = "Vector2", name = "v1"},
{type = "Vector2", name = "v2"},
{type = "Vector2", name = "v3"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleFan",
description = "Draw a triangle fan defined by points (first vertex is the center)",
returnType = "void",
params = {
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
},
{
name = "DrawTriangleStrip",
description = "Draw a triangle strip defined by points",
returnType = "void",
params = {
{type = "const Vector2 *", name = "points"},
{type = "int", name = "pointCount"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPoly",
description = "Draw a polygon of n sides",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPolyLines",
description = "Draw a polygon outline of n sides",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "Color", name = "color"}
}
},
{
name = "DrawPolyLinesEx",
description = "Draw a polygon outline of n sides with extended parameters",
returnType = "void",
params = {
{type = "Vector2", name = "center"},
{type = "int", name = "sides"},
{type = "float", name = "radius"},
{type = "float", name = "rotation"},
{type = "float", name = "lineThick"},
{type = "Color", name = "color"}
}
},
{ {
name = "DrawSplineLinear", name = "DrawSplineLinear",
description = "Draw spline: Linear, minimum 2 points", description = "Draw spline: Linear, minimum 2 points",
@ -6123,106 +6128,13 @@ return {
} }
}, },
{ {
name = "ImageDrawCircle", name = "ImageDrawLineStrip",
description = "Draw a filled circle within an image", description = "Draw a lines sequence within an image",
returnType = "void", returnType = "void",
params = { params = {
{type = "Image *", name = "dst"}, {type = "Image *", name = "dst"},
{type = "int", name = "centerX"}, {type = "const Vector2 *", name = "points"},
{type = "int", name = "centerY"}, {type = "int", name = "pointCount"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleV",
description = "Draw a filled circle within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "center"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleLines",
description = "Draw circle outline within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "centerX"},
{type = "int", name = "centerY"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleLinesV",
description = "Draw circle outline within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "center"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangle",
description = "Draw rectangle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleV",
description = "Draw rectangle within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "position"},
{type = "Vector2", name = "size"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleRec",
description = "Draw rectangle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Rectangle", name = "rec"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleLines",
description = "Draw rectangle lines within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleLinesEx",
description = "Draw rectangle lines within an image with extended parameters",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Rectangle", name = "rec"},
{type = "int", name = "thick"},
{type = "Color", name = "color"} {type = "Color", name = "color"}
} }
}, },
@ -6287,14 +6199,156 @@ return {
} }
}, },
{ {
name = "ImageDraw", name = "ImageDrawRectangle",
description = "Draw a source image within a destination image (tint applied to source)", description = "Draw rectangle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleV",
description = "Draw rectangle within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "position"},
{type = "Vector2", name = "size"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleRec",
description = "Draw rectangle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Rectangle", name = "rec"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleLines",
description = "Draw rectangle lines within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "int", name = "width"},
{type = "int", name = "height"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawRectangleLinesEx",
description = "Draw rectangle lines within an image with line thickness",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Rectangle", name = "rec"},
{type = "int", name = "thick"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircle",
description = "Draw a filled circle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "centerX"},
{type = "int", name = "centerY"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleV",
description = "Draw a filled circle within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "center"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleLines",
description = "Draw circle outline within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "int", name = "centerX"},
{type = "int", name = "centerY"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleLinesV",
description = "Draw circle outline within an image (Vector version)",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "center"},
{type = "int", name = "radius"},
{type = "Color", name = "color"}
}
},
{
name = "ImageDrawCircleGradient",
description = "Draw a gradient-filled circle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Vector2", name = "center"},
{type = "float", name = "radius"},
{type = "Color", name = "inner"},
{type = "Color", name = "outer"}
}
},
{
name = "ImageDrawImage",
description = "Draw an image within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Image", name = "src"},
{type = "int", name = "posX"},
{type = "int", name = "posY"},
{type = "Color", name = "tint"}
}
},
{
name = "ImageDrawImageRec",
description = "Draw a part of an image defined by a rectangle within an image",
returnType = "void",
params = {
{type = "Image *", name = "dst"},
{type = "Image", name = "src"},
{type = "Rectangle", name = "srcRec"},
{type = "Vector2", name = "position"},
{type = "Color", name = "tint"}
}
},
{
name = "ImageDrawImagePro",
description = "Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image",
returnType = "void", returnType = "void",
params = { params = {
{type = "Image *", name = "dst"}, {type = "Image *", name = "dst"},
{type = "Image", name = "src"}, {type = "Image", name = "src"},
{type = "Rectangle", name = "srcRec"}, {type = "Rectangle", name = "srcRec"},
{type = "Rectangle", name = "dstRec"}, {type = "Rectangle", name = "dstRec"},
{type = "Vector2", name = "origin"},
{type = "float", name = "rotation"},
{type = "Color", name = "tint"} {type = "Color", name = "tint"}
} }
}, },
@ -6459,7 +6513,7 @@ return {
}, },
{ {
name = "DrawTextureEx", name = "DrawTextureEx",
description = "Draw a Texture2D with extended parameters", description = "Draw a Texture2D with rotation and scale",
returnType = "void", returnType = "void",
params = { params = {
{type = "Texture2D", name = "texture"}, {type = "Texture2D", name = "texture"},
@ -6674,7 +6728,7 @@ return {
}, },
{ {
name = "LoadFontEx", name = "LoadFontEx",
description = "Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height", description = "Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height",
returnType = "Font", returnType = "Font",
params = { params = {
{type = "const char *", name = "fileName"}, {type = "const char *", name = "fileName"},
@ -7258,7 +7312,7 @@ return {
}, },
{ {
name = "DrawTriangle3D", name = "DrawTriangle3D",
description = "Draw a color-filled triangle (vertex in counter-clockwise order!)", description = "Draw a color-filled triangle, counter-clockwise vertex order",
returnType = "void", returnType = "void",
params = { params = {
{type = "Vector3", name = "v1"}, {type = "Vector3", name = "v1"},
@ -7333,7 +7387,7 @@ return {
}, },
{ {
name = "DrawSphereEx", name = "DrawSphereEx",
description = "Draw sphere with extended parameters", description = "Draw sphere with defined rings and slices",
returnType = "void", returnType = "void",
params = { params = {
{type = "Vector3", name = "centerPos"}, {type = "Vector3", name = "centerPos"},
@ -7514,7 +7568,7 @@ return {
}, },
{ {
name = "DrawModelEx", name = "DrawModelEx",
description = "Draw a model with extended parameters", description = "Draw a model with custom transform",
returnType = "void", returnType = "void",
params = { params = {
{type = "Model", name = "model"}, {type = "Model", name = "model"},
@ -7538,7 +7592,7 @@ return {
}, },
{ {
name = "DrawModelWiresEx", name = "DrawModelWiresEx",
description = "Draw a model wires (with texture if set) with extended parameters", description = "Draw a model wires with custom transform",
returnType = "void", returnType = "void",
params = { params = {
{type = "Model", name = "model"}, {type = "Model", name = "model"},

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="Windows-1252" ?> <?xml version="1.0" encoding="Windows-1252" ?>
<raylibAPI> <raylibAPI>
<Defines count="57"> <Defines count="56">
<Define name="RAYLIB_H" type="GUARD" value="" desc="" /> <Define name="RAYLIB_H" type="GUARD" value="" desc="" />
<Define name="RAYLIB_VERSION_MAJOR" type="INT" value="6" desc="" /> <Define name="RAYLIB_VERSION_MAJOR" type="INT" value="6" desc="" />
<Define name="RAYLIB_VERSION_MINOR" type="INT" value="1" desc="" /> <Define name="RAYLIB_VERSION_MINOR" type="INT" value="1" desc="" />
@ -57,7 +57,6 @@
<Define name="MATERIAL_MAP_SPECULAR" type="UNKNOWN" value="MATERIAL_MAP_METALNESS" desc="" /> <Define name="MATERIAL_MAP_SPECULAR" type="UNKNOWN" value="MATERIAL_MAP_METALNESS" desc="" />
<Define name="SHADER_LOC_MAP_DIFFUSE" type="UNKNOWN" value="SHADER_LOC_MAP_ALBEDO" desc="" /> <Define name="SHADER_LOC_MAP_DIFFUSE" type="UNKNOWN" value="SHADER_LOC_MAP_ALBEDO" desc="" />
<Define name="SHADER_LOC_MAP_SPECULAR" type="UNKNOWN" value="SHADER_LOC_MAP_METALNESS" desc="" /> <Define name="SHADER_LOC_MAP_SPECULAR" type="UNKNOWN" value="SHADER_LOC_MAP_METALNESS" desc="" />
<Define name="GetMouseRay" type="UNKNOWN" value="GetScreenToWorldRay" desc="Compatibility hack for previous raylib versions" />
</Defines> </Defines>
<Structs count="35"> <Structs count="35">
<Struct name="Vector2" fieldCount="2" desc="Vector2, 2 components"> <Struct name="Vector2" fieldCount="2" desc="Vector2, 2 components">
@ -682,7 +681,7 @@
<Param type="unsigned int" name="frames" desc="" /> <Param type="unsigned int" name="frames" desc="" />
</Callback> </Callback>
</Callbacks> </Callbacks>
<Functions count="602"> <Functions count="607">
<Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context"> <Function name="InitWindow" retType="void" paramCount="3" desc="Initialize window and OpenGL context">
<Param type="int" name="width" desc="" /> <Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" /> <Param type="int" name="height" desc="" />
@ -1403,6 +1402,134 @@
<Param type="int" name="spaceSize" desc="" /> <Param type="int" name="spaceSize" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawTriangle" retType="void" paramCount="4" desc="Draw a color-filled triangle, counter-clockwise vertex order">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleGradient" retType="void" paramCount="6" desc="Draw triangle with interpolated colors, counter-clockwise vertex/color order">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="c1" desc="" />
<Param type="Color" name="c2" desc="" />
<Param type="Color" name="c3" desc="" />
</Function>
<Function name="DrawTriangleLines" retType="void" paramCount="4" desc="Draw triangle outline, counter-clockwise vertex order">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangle" retType="void" paramCount="5" desc="Draw a color-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rectangle (Vector version)">
<Param type="Vector2" name="position" desc="" />
<Param type="Vector2" name="size" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rectangle">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rectangle with pro parameters">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Vector2" name="origin" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="top" desc="" />
<Param type="Color" name="bottom" desc="" />
</Function>
<Function name="DrawRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="left" desc="" />
<Param type="Color" name="right" desc="" />
</Function>
<Function name="DrawRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="col1" desc="" />
<Param type="Color" name="col2" desc="" />
<Param type="Color" name="col3" desc="" />
<Param type="Color" name="col4" desc="" />
</Function>
<Function name="DrawRectangleLines" retType="void" paramCount="5" desc="Draw rectangle outline">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleLinesEx" retType="void" paramCount="3" desc="Draw rectangle outline with line thickness">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRounded" retType="void" paramCount="4" desc="Draw rectangle with rounded edges">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRoundedLines" retType="void" paramCount="4" desc="Draw rectangle lines with rounded edges">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRoundedLinesEx" retType="void" paramCount="5" desc="Draw rectangle lines with rounded edges outline and line thickness">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPoly" retType="void" paramCount="5" desc="Draw a polygon of n sides">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPolyLines" retType="void" paramCount="5" desc="Draw a polygon outline of n sides">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPolyLinesEx" retType="void" paramCount="6" desc="Draw a polygon outline of n sides with line thickness">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawCircle" retType="void" paramCount="4" desc="Draw a color-filled circle"> <Function name="DrawCircle" retType="void" paramCount="4" desc="Draw a color-filled circle">
<Param type="int" name="centerX" desc="" /> <Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" /> <Param type="int" name="centerY" desc="" />
@ -1447,6 +1574,12 @@
<Param type="float" name="radius" desc="" /> <Param type="float" name="radius" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawCircleLinesEx" retType="void" paramCount="4" desc="Draw circle outline with line thickness">
<Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawEllipse" retType="void" paramCount="5" desc="Draw ellipse"> <Function name="DrawEllipse" retType="void" paramCount="5" desc="Draw ellipse">
<Param type="int" name="centerX" desc="" /> <Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" /> <Param type="int" name="centerY" desc="" />
@ -1491,134 +1624,6 @@
<Param type="int" name="segments" desc="" /> <Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawRectangle" retType="void" paramCount="5" desc="Draw a color-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rectangle (Vector version)">
<Param type="Vector2" name="position" desc="" />
<Param type="Vector2" name="size" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rectangle">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rectangle with pro parameters">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Vector2" name="origin" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="top" desc="" />
<Param type="Color" name="bottom" desc="" />
</Function>
<Function name="DrawRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rectangle">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="left" desc="" />
<Param type="Color" name="right" desc="" />
</Function>
<Function name="DrawRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rectangle with custom vertex colors">
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="topLeft" desc="" />
<Param type="Color" name="bottomLeft" desc="" />
<Param type="Color" name="bottomRight" desc="" />
<Param type="Color" name="topRight" desc="" />
</Function>
<Function name="DrawRectangleLines" retType="void" paramCount="5" desc="Draw rectangle outline">
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleLinesEx" retType="void" paramCount="3" desc="Draw rectangle outline with extended parameters">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="lineThick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRounded" retType="void" paramCount="4" desc="Draw rectangle with rounded edges">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRoundedLines" retType="void" paramCount="4" desc="Draw rectangle lines with rounded edges">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawRectangleRoundedLinesEx" retType="void" paramCount="5" desc="Draw rectangle lines with rounded edges outline">
<Param type="Rectangle" name="rec" desc="" />
<Param type="float" name="roundness" desc="" />
<Param type="int" name="segments" desc="" />
<Param type="float" name="lineThick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangle" retType="void" paramCount="4" desc="Draw a color-filled triangle (vertex in counter-clockwise order!)">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleGradient" retType="void" paramCount="6" desc="Draw triangle with interpolated colors (vertex in counter-clockwise order!)">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="c1" desc="" />
<Param type="Color" name="c2" desc="" />
<Param type="Color" name="c3" desc="" />
</Function>
<Function name="DrawTriangleLines" retType="void" paramCount="4" desc="Draw triangle outline (vertex in counter-clockwise order!)">
<Param type="Vector2" name="v1" desc="" />
<Param type="Vector2" name="v2" desc="" />
<Param type="Vector2" name="v3" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleFan" retType="void" paramCount="3" desc="Draw a triangle fan defined by points (first vertex is the center)">
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawTriangleStrip" retType="void" paramCount="3" desc="Draw a triangle strip defined by points">
<Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPoly" retType="void" paramCount="5" desc="Draw a polygon of n sides">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPolyLines" retType="void" paramCount="5" desc="Draw a polygon outline of n sides">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawPolyLinesEx" retType="void" paramCount="6" desc="Draw a polygon outline of n sides with extended parameters">
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="sides" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="float" name="lineThick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points"> <Function name="DrawSplineLinear" retType="void" paramCount="4" desc="Draw spline: Linear, minimum 2 points">
<Param type="const Vector2 *" name="points" desc="" /> <Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="pointCount" desc="" /> <Param type="int" name="pointCount" desc="" />
@ -2067,63 +2072,10 @@
<Param type="int" name="thick" desc="" /> <Param type="int" name="thick" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="ImageDrawCircle" retType="void" paramCount="5" desc="Draw a filled circle within an image"> <Function name="ImageDrawLineStrip" retType="void" paramCount="4" desc="Draw a lines sequence within an image">
<Param type="Image *" name="dst" desc="" /> <Param type="Image *" name="dst" desc="" />
<Param type="int" name="centerX" desc="" /> <Param type="const Vector2 *" name="points" desc="" />
<Param type="int" name="centerY" desc="" /> <Param type="int" name="pointCount" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleV" retType="void" paramCount="4" desc="Draw a filled circle within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleLines" retType="void" paramCount="5" desc="Draw circle outline within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleLinesV" retType="void" paramCount="4" desc="Draw circle outline within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangle" retType="void" paramCount="6" desc="Draw rectangle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleV" retType="void" paramCount="4" desc="Draw rectangle within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="position" desc="" />
<Param type="Vector2" name="size" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleRec" retType="void" paramCount="3" desc="Draw rectangle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleLines" retType="void" paramCount="6" desc="Draw rectangle lines within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleLinesEx" retType="void" paramCount="4" desc="Draw rectangle lines within an image with extended parameters">
<Param type="Image *" name="dst" desc="" />
<Param type="Rectangle" name="rec" desc="" />
<Param type="int" name="thick" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="ImageDrawTriangle" retType="void" paramCount="5" desc="Draw triangle within an image"> <Function name="ImageDrawTriangle" retType="void" paramCount="5" desc="Draw triangle within an image">
@ -2161,11 +2113,93 @@
<Param type="int" name="pointCount" desc="" /> <Param type="int" name="pointCount" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="ImageDraw" retType="void" paramCount="5" desc="Draw a source image within a destination image (tint applied to source)"> <Function name="ImageDrawRectangle" retType="void" paramCount="6" desc="Draw rectangle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleV" retType="void" paramCount="4" desc="Draw rectangle within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="position" desc="" />
<Param type="Vector2" name="size" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleRec" retType="void" paramCount="3" desc="Draw rectangle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="Rectangle" name="rec" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleLines" retType="void" paramCount="6" desc="Draw rectangle lines within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="int" name="width" desc="" />
<Param type="int" name="height" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawRectangleLinesEx" retType="void" paramCount="4" desc="Draw rectangle lines within an image with line thickness">
<Param type="Image *" name="dst" desc="" />
<Param type="Rectangle" name="rec" desc="" />
<Param type="int" name="thick" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircle" retType="void" paramCount="5" desc="Draw a filled circle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleV" retType="void" paramCount="4" desc="Draw a filled circle within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleLines" retType="void" paramCount="5" desc="Draw circle outline within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="int" name="centerX" desc="" />
<Param type="int" name="centerY" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleLinesV" retType="void" paramCount="4" desc="Draw circle outline within an image (Vector version)">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="center" desc="" />
<Param type="int" name="radius" desc="" />
<Param type="Color" name="color" desc="" />
</Function>
<Function name="ImageDrawCircleGradient" retType="void" paramCount="5" desc="Draw a gradient-filled circle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="Vector2" name="center" desc="" />
<Param type="float" name="radius" desc="" />
<Param type="Color" name="inner" desc="" />
<Param type="Color" name="outer" desc="" />
</Function>
<Function name="ImageDrawImage" retType="void" paramCount="5" desc="Draw an image within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="Image" name="src" desc="" />
<Param type="int" name="posX" desc="" />
<Param type="int" name="posY" desc="" />
<Param type="Color" name="tint" desc="" />
</Function>
<Function name="ImageDrawImageRec" retType="void" paramCount="5" desc="Draw a part of an image defined by a rectangle within an image">
<Param type="Image *" name="dst" desc="" />
<Param type="Image" name="src" desc="" />
<Param type="Rectangle" name="srcRec" desc="" />
<Param type="Vector2" name="position" desc="" />
<Param type="Color" name="tint" desc="" />
</Function>
<Function name="ImageDrawImagePro" retType="void" paramCount="7" desc="Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image">
<Param type="Image *" name="dst" desc="" /> <Param type="Image *" name="dst" desc="" />
<Param type="Image" name="src" desc="" /> <Param type="Image" name="src" desc="" />
<Param type="Rectangle" name="srcRec" desc="" /> <Param type="Rectangle" name="srcRec" desc="" />
<Param type="Rectangle" name="dstRec" desc="" /> <Param type="Rectangle" name="dstRec" desc="" />
<Param type="Vector2" name="origin" desc="" />
<Param type="float" name="rotation" desc="" />
<Param type="Color" name="tint" desc="" /> <Param type="Color" name="tint" desc="" />
</Function> </Function>
<Function name="ImageDrawText" retType="void" paramCount="6" desc="Draw text (using default font) within an image (destination)"> <Function name="ImageDrawText" retType="void" paramCount="6" desc="Draw text (using default font) within an image (destination)">
@ -2242,7 +2276,7 @@
<Param type="Vector2" name="position" desc="" /> <Param type="Vector2" name="position" desc="" />
<Param type="Color" name="tint" desc="" /> <Param type="Color" name="tint" desc="" />
</Function> </Function>
<Function name="DrawTextureEx" retType="void" paramCount="5" desc="Draw a Texture2D with extended parameters"> <Function name="DrawTextureEx" retType="void" paramCount="5" desc="Draw a Texture2D with rotation and scale">
<Param type="Texture2D" name="texture" desc="" /> <Param type="Texture2D" name="texture" desc="" />
<Param type="Vector2" name="position" desc="" /> <Param type="Vector2" name="position" desc="" />
<Param type="float" name="rotation" desc="" /> <Param type="float" name="rotation" desc="" />
@ -2344,7 +2378,7 @@
<Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)"> <Function name="LoadFont" retType="Font" paramCount="1" desc="Load font from file into GPU memory (VRAM)">
<Param type="const char *" name="fileName" desc="" /> <Param type="const char *" name="fileName" desc="" />
</Function> </Function>
<Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height"> <Function name="LoadFontEx" retType="Font" paramCount="4" desc="Load font from file with defined codepoints and generation size, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height">
<Param type="const char *" name="fileName" desc="" /> <Param type="const char *" name="fileName" desc="" />
<Param type="int" name="fontSize" desc="" /> <Param type="int" name="fontSize" desc="" />
<Param type="const int *" name="codepoints" desc="" /> <Param type="const int *" name="codepoints" desc="" />
@ -2628,7 +2662,7 @@
<Param type="float" name="rotationAngle" desc="" /> <Param type="float" name="rotationAngle" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawTriangle3D" retType="void" paramCount="4" desc="Draw a color-filled triangle (vertex in counter-clockwise order!)"> <Function name="DrawTriangle3D" retType="void" paramCount="4" desc="Draw a color-filled triangle, counter-clockwise vertex order">
<Param type="Vector3" name="v1" desc="" /> <Param type="Vector3" name="v1" desc="" />
<Param type="Vector3" name="v2" desc="" /> <Param type="Vector3" name="v2" desc="" />
<Param type="Vector3" name="v3" desc="" /> <Param type="Vector3" name="v3" desc="" />
@ -2668,7 +2702,7 @@
<Param type="float" name="radius" desc="" /> <Param type="float" name="radius" desc="" />
<Param type="Color" name="color" desc="" /> <Param type="Color" name="color" desc="" />
</Function> </Function>
<Function name="DrawSphereEx" retType="void" paramCount="5" desc="Draw sphere with extended parameters"> <Function name="DrawSphereEx" retType="void" paramCount="5" desc="Draw sphere with defined rings and slices">
<Param type="Vector3" name="centerPos" desc="" /> <Param type="Vector3" name="centerPos" desc="" />
<Param type="float" name="radius" desc="" /> <Param type="float" name="radius" desc="" />
<Param type="int" name="rings" desc="" /> <Param type="int" name="rings" desc="" />
@ -2764,7 +2798,7 @@
<Param type="float" name="scale" desc="" /> <Param type="float" name="scale" desc="" />
<Param type="Color" name="tint" desc="" /> <Param type="Color" name="tint" desc="" />
</Function> </Function>
<Function name="DrawModelEx" retType="void" paramCount="6" desc="Draw a model with extended parameters"> <Function name="DrawModelEx" retType="void" paramCount="6" desc="Draw a model with custom transform">
<Param type="Model" name="model" desc="" /> <Param type="Model" name="model" desc="" />
<Param type="Vector3" name="position" desc="" /> <Param type="Vector3" name="position" desc="" />
<Param type="Vector3" name="rotationAxis" desc="" /> <Param type="Vector3" name="rotationAxis" desc="" />
@ -2778,7 +2812,7 @@
<Param type="float" name="scale" desc="" /> <Param type="float" name="scale" desc="" />
<Param type="Color" name="tint" desc="" /> <Param type="Color" name="tint" desc="" />
</Function> </Function>
<Function name="DrawModelWiresEx" retType="void" paramCount="6" desc="Draw a model wires (with texture if set) with extended parameters"> <Function name="DrawModelWiresEx" retType="void" paramCount="6" desc="Draw a model wires with custom transform">
<Param type="Model" name="model" desc="" /> <Param type="Model" name="model" desc="" />
<Param type="Vector3" name="position" desc="" /> <Param type="Vector3" name="position" desc="" />
<Param type="Vector3" name="rotationAxis" desc="" /> <Param type="Vector3" name="rotationAxis" desc="" />