diff --git a/BINDINGS.md b/BINDINGS.md index bd5d6b213..7c393593c 100644 --- a/BINDINGS.md +++ b/BINDINGS.md @@ -26,6 +26,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [raylib-cr](https://github.com/sol-vin/raylib-cr) | 4.6-dev (5e1a81) | [Crystal](https://crystal-lang.org) | Apache-2.0 | | [ray-cyber](https://github.com/fubark/ray-cyber) | **5.0** | [Cyber](https://cyberscript.dev) | MIT | | [dart-raylib](https://gitlab.com/wolfenrain/dart-raylib) | 4.0 | [Dart](https://dart.dev) | MIT | +| [raylib_dart](https://pub.dev/packages/raylib_dart) | 6.0 | [Dart](https://dart.dev) | MIT | | [bindbc-raylib3](https://github.com/o3o/bindbc-raylib3) | **5.0** | [D](https://dlang.org) | BSL-1.0 | | [dray](https://github.com/redthing1/dray) | **5.0** | [D](https://dlang.org) | Apache-2.0 | | [raylib-d](https://github.com/schveiguy/raylib-d) | **6.0** | [D](https://dlang.org) | Zlib | @@ -62,7 +63,7 @@ Some people ported raylib to other languages in the form of bindings or wrappers | [node-raylib](https://github.com/RobLoach/node-raylib) | 4.5 | [Node.js](https://nodejs.org/en) | Zlib | | [raylib-odin](https://github.com/odin-lang/Odin/tree/master/vendor/raylib) | **5.5** | [Odin](https://odin-lang.org) | Zlib | | [raylib_odin_bindings](https://github.com/Deathbat2190/raylib_odin_bindings) | 4.0-dev | [Odin](https://odin-lang.org) | MIT | -| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **5.0** | [OCaml](https://ocaml.org) | MIT | +| [raylib-ocaml](https://github.com/tjammer/raylib-ocaml) | **6.0** | [OCaml](https://ocaml.org) | MIT | | [TurboRaylib](https://github.com/turborium/TurboRaylib) | 4.5 | [Object Pascal](https://en.wikipedia.org/wiki/Object_Pascal) | MIT | | [Ray4Laz](https://github.com/GuvaCode/Ray4Laz) | **6.0** | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal)/[Delphi](https://en.wikipedia.org/wiki/Delphi_(software)) | Zlib | | [Raylib.4.0.Pascal](https://github.com/sysrpl/Raylib.4.0.Pascal) | 4.0 | [Free Pascal](https://en.wikipedia.org/wiki/Free_Pascal) | Zlib | diff --git a/examples/models/models_basic_voxel.c b/examples/models/models_basic_voxel.c index 127a7e989..8d8b6b0c7 100644 --- a/examples/models/models_basic_voxel.c +++ b/examples/models/models_basic_voxel.c @@ -77,7 +77,7 @@ int main(void) { // Cast a ray from the screen center (where crosshair would be) Vector2 screenCenter = { GetScreenWidth()/2.0f, GetScreenHeight()/2.0f }; - Ray ray = GetMouseRay(screenCenter, camera); + Ray ray = GetScreenToWorldRay(screenCenter, camera); // Check ray collision with all voxels float closestDistance = 99999.0f; diff --git a/examples/textures/textures_image_drawing.c b/examples/textures/textures_image_drawing.c index ea41b7baf..640a9c45c 100644 --- a/examples/textures/textures_image_drawing.c +++ b/examples/textures/textures_image_drawing.c @@ -39,7 +39,8 @@ int main(void) Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) // 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 // Draw on the image with a few image draw methods diff --git a/src/platforms/rcore_desktop_win32.c b/src/platforms/rcore_desktop_win32.c index 517af1eb8..16ac21e26 100644 --- a/src/platforms/rcore_desktop_win32.c +++ b/src/platforms/rcore_desktop_win32.c @@ -2034,7 +2034,7 @@ static void HandleKey(WPARAM wparam, LPARAM lparam, char state) { CORE.Input.Keyboard.currentKeyState[key] = state; - if ((key == KEY_ESCAPE) && (state == 1)) CORE.Window.shouldClose = true; + if ((key == CORE.Input.Keyboard.exitKey) && (state == 1)) CORE.Window.shouldClose = true; } else TRACELOG(LOG_WARNING, "INPUT: Unknown (or currently unhandled) virtual keycode %d (0x%x)", wparam, wparam); @@ -2274,4 +2274,4 @@ static bool IsWglExtensionAvailable(HDC hdc, const char *extension) } return result; -} \ No newline at end of file +} diff --git a/src/raudio.c b/src/raudio.c index 3ae2fba0f..7963eb33d 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -1784,7 +1784,7 @@ void UnloadMusicStream(Music music) else if (music.ctxType == MUSIC_AUDIO_QOA) qoaplay_close((qoaplay_desc *)music.ctxData); #endif #if SUPPORT_FILEFORMAT_FLAC - else if (music.ctxType == MUSIC_AUDIO_FLAC) { drflac_close((drflac *)music.ctxData); drflac_free((drflac *)music.ctxData, NULL); } + else if (music.ctxType == MUSIC_AUDIO_FLAC) drflac_close((drflac *)music.ctxData); #endif #if SUPPORT_FILEFORMAT_XM else if (music.ctxType == MUSIC_MODULE_XM) jar_xm_free_context((jar_xm_context_t *)music.ctxData); diff --git a/src/raylib.h b/src/raylib.h index 7313ffaf3..e49d6b2f7 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1080,7 +1080,6 @@ RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture) RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) // 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 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 @@ -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 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 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 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 @@ -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 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 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 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 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 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 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 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 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 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 ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a lines sequence 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 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 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 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 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 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 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 @@ -1492,7 +1497,7 @@ RLAPI int GetPixelDataSize(int width, int height, int format); // G // Font loading/unloading functions RLAPI Font GetFontDefault(void); // Get the default Font 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 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) @@ -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 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 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 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 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 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 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 @@ -1600,9 +1605,9 @@ RLAPI BoundingBox GetModelBoundingBox(Model model); // Model drawing functions 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 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 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 diff --git a/src/rmodels.c b/src/rmodels.c index 32ade139f..21f69c92e 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -435,7 +435,7 @@ void DrawSphere(Vector3 centerPos, float radius, Color 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) { #if 0 @@ -772,7 +772,7 @@ void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, fl void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int rings, int slices, Color color) { if (slices < 3) slices = 3; - + if (rings < 1) rings = 1; Vector3 direction = { endPos.x - startPos.x, endPos.y - startPos.y, endPos.z - startPos.z }; // draw a sphere if start and end points are the same @@ -911,7 +911,7 @@ void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int rings, int void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int rings, int slices, Color color) { if (slices < 3) slices = 3; - + if (rings < 1) rings = 1; Vector3 direction = { endPos.x - startPos.x, endPos.y - startPos.y, endPos.z - startPos.z }; // draw a sphere if start and end points are the same @@ -1222,6 +1222,8 @@ void UnloadModel(Model model) // Unload animation data RL_FREE(model.skeleton.bones); RL_FREE(model.skeleton.bindPose); + RL_FREE(model.currentPose); + RL_FREE(model.boneMatrices); TRACELOG(LOG_INFO, "MODEL: Unloaded model (and meshes) from RAM and VRAM"); } @@ -3916,7 +3918,7 @@ void DrawModel(Model model, Vector3 position, float scale, Color 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) { // Calculate transformation matrix from function parameters @@ -3970,7 +3972,7 @@ void DrawModelWires(Model model, Vector3 position, float scale, Color tint) 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) { rlEnableWireMode(); @@ -6142,17 +6144,36 @@ static Model LoadGLTF(const char *fileName) for (int i = 0; i < model.skeleton.boneCount; i++) { - cgltf_node *node = skin.joints[i]; - cgltf_float worldTransform[16]; - cgltf_node_transform_world(node, worldTransform); - Matrix worldMatrix = { - worldTransform[0], worldTransform[4], worldTransform[8], worldTransform[12], - worldTransform[1], worldTransform[5], worldTransform[9], worldTransform[13], - worldTransform[2], worldTransform[6], worldTransform[10], worldTransform[14], - worldTransform[3], worldTransform[7], worldTransform[11], worldTransform[15] - }; + Matrix bindMatrix = { 0 }; + cgltf_float inverseBindTransform[16] = { 0 }; - MatrixDecompose(worldMatrix, + if ((skin.inverse_bind_matrices != NULL) && + (skin.inverse_bind_matrices->count >= skin.joints_count) && + cgltf_accessor_read_float(skin.inverse_bind_matrices, i, inverseBindTransform, 16)) + { + Matrix inverseBindMatrix = { + inverseBindTransform[0], inverseBindTransform[4], inverseBindTransform[8], inverseBindTransform[12], + inverseBindTransform[1], inverseBindTransform[5], inverseBindTransform[9], inverseBindTransform[13], + inverseBindTransform[2], inverseBindTransform[6], inverseBindTransform[10], inverseBindTransform[14], + inverseBindTransform[3], inverseBindTransform[7], inverseBindTransform[11], inverseBindTransform[15] + }; + bindMatrix = MatrixInvert(inverseBindMatrix); + } + else + { + cgltf_float worldTransform[16] = { 0 }; + cgltf_node_transform_world(skin.joints[i], worldTransform); + + Matrix worldMatrix = { + worldTransform[0], worldTransform[4], worldTransform[8], worldTransform[12], + worldTransform[1], worldTransform[5], worldTransform[9], worldTransform[13], + worldTransform[2], worldTransform[6], worldTransform[10], worldTransform[14], + worldTransform[3], worldTransform[7], worldTransform[11], worldTransform[15] + }; + bindMatrix = worldMatrix; + } + + MatrixDecompose(bindMatrix, &(model.skeleton.bindPose[i].translation), &(model.skeleton.bindPose[i].rotation), &(model.skeleton.bindPose[i].scale)); diff --git a/src/rshapes.c b/src/rshapes.c index 38c8a1fbe..12ae6a164 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -311,408 +311,128 @@ void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSiz rlEnd(); } -// Draw a color-filled circle -void DrawCircle(int centerX, int centerY, float radius, Color color) +// Draw a triangle +// NOTE: Vertex must be provided in counter-clockwise order +void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color) { - DrawCircleV((Vector2){ (float)centerX, (float)centerY }, radius, color); + DrawTriangleGradient(v1, v2, v3, color, color, color); } -// Draw a color-filled circle (Vector version) -// NOTE: On OpenGL 3.3 and ES2 using QUADS to avoid drawing order issues -void DrawCircleV(Vector2 center, float radius, Color color) +// Draw triangle with interpolated colors (vertex in counter-clockwise order!) +void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3) { - DrawCircleSector(center, radius, 0, 360, 36, color); -} - -// Draw a gradient-filled circle -void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer) -{ - rlBegin(RL_TRIANGLES); - for (int i = 0; i < 360; i += 10) - { - rlColor4ub(inner.r, inner.g, inner.b, inner.a); - rlVertex2f(center.x, center.y); - rlColor4ub(outer.r, outer.g, outer.b, outer.a); - rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radius, center.y + sinf(DEG2RAD*(i + 10))*radius); - rlColor4ub(outer.r, outer.g, outer.b, outer.a); - rlVertex2f(center.x + cosf(DEG2RAD*i)*radius, center.y + sinf(DEG2RAD*i)*radius); - } - rlEnd(); -} - -// Draw a piece of a circle -void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) -{ - if (startAngle == endAngle) return; - if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero - - // Function expects (endAngle > startAngle) - if (endAngle < startAngle) - { - // Swap values - float tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } - - int minSegments = (int)ceilf((endAngle - startAngle)/90); - - if (segments < minSegments) - { - // Calculate the maximum angle between segments based on the error rate (usually 0.5f) - float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1); - segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); - - if (segments <= 0) segments = minSegments; - } - - float stepLength = (endAngle - startAngle)/(float)segments; - float angle = startAngle; - #if SUPPORT_QUADS_DRAW_MODE rlSetTexture(GetShapesTexture().id); Rectangle shapeRect = GetShapesTextureRectangle(); rlBegin(RL_QUADS); + rlNormal3f(0.0f, 0.0f, 1.0f); - // NOTE: Every QUAD actually represents two segments - for (int i = 0; i < segments/2; i++) - { - rlColor4ub(color.r, color.g, color.b, color.a); + rlColor4ub(c1.r, c1.g, c1.b, c1.a); + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(v1.x, v1.y); - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x, center.y); + rlColor4ub(c2.r, c2.g, c2.b, c2.a); + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(v2.x, v2.y); - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength*2.0f))*radius, center.y + sinf(DEG2RAD*(angle + stepLength*2.0f))*radius); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); - - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - - angle += (stepLength*2.0f); - } - - // NOTE: In case number of segments is odd, adding one last piece to the cake - if ((((unsigned int)segments)%2) == 1) - { - rlColor4ub(color.r, color.g, color.b, color.a); - - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x, center.y); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); - - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x, center.y); - } + rlColor4ub(c3.r, c3.g, c3.b, c3.a); + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(v3.x, v3.y); + rlColor4ub(c3.r, c3.g, c3.b, c3.a); + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(v3.x, v3.y); rlEnd(); rlSetTexture(0); #else rlBegin(RL_TRIANGLES); - for (int i = 0; i < segments; i++) - { - rlColor4ub(color.r, color.g, color.b, color.a); - - rlVertex2f(center.x, center.y); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - - angle += stepLength; - } + rlColor4ub(c1.r, c1.g, c1.b, c1.a); + rlVertex2f(v1.x, v1.y); + rlColor4ub(c2.r, c2.g, c2.b, c2.a); + rlVertex2f(v2.x, v2.y); + rlColor4ub(c3.r, c3.g, c3.b, c3.a); + rlVertex2f(v3.x, v3.y); rlEnd(); #endif } -// Draw a piece of a circle outlines -void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) -{ - if (startAngle == endAngle) return; - if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue - - // Function expects (endAngle > startAngle) - if (endAngle < startAngle) - { - // Swap values - float tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } - - int minSegments = (int)ceilf((endAngle - startAngle)/90); - - if (segments < minSegments) - { - // Calculate the maximum angle between segments based on the error rate (usually 0.5f) - float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1); - segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); - - if (segments <= 0) segments = minSegments; - } - - float stepLength = (endAngle - startAngle)/(float)segments; - float angle = startAngle; - bool showCapLines = true; - - rlBegin(RL_LINES); - if (showCapLines) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x, center.y); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - } - - for (int i = 0; i < segments; i++) - { - rlColor4ub(color.r, color.g, color.b, color.a); - - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); - - angle += stepLength; - } - - if (showCapLines) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x, center.y); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); - } - rlEnd(); -} - -// Draw circle outline -void DrawCircleLines(int centerX, int centerY, float radius, Color color) -{ - DrawCircleLinesV((Vector2){ (float)centerX, (float)centerY }, radius, color); -} - -// Draw circle outline (Vector version) -void DrawCircleLinesV(Vector2 center, float radius, Color color) +// Draw a triangle using lines +// NOTE: Vertex must be provided in counter-clockwise order +void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color) { rlBegin(RL_LINES); rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(v1.x, v1.y); + rlVertex2f(v2.x, v2.y); - // NOTE: Circle outline is drawn pixel by pixel every degree (0 to 360) - for (int i = 0; i < 360; i += 10) - { - rlVertex2f(center.x + cosf(DEG2RAD*i)*radius, center.y + sinf(DEG2RAD*i)*radius); - rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radius, center.y + sinf(DEG2RAD*(i + 10))*radius); - } + rlVertex2f(v2.x, v2.y); + rlVertex2f(v3.x, v3.y); + + rlVertex2f(v3.x, v3.y); + rlVertex2f(v1.x, v1.y); rlEnd(); } -// Draw ellipse -void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color) +// Draw a triangle fan defined by points +// NOTE: First vertex provided is the center, shared by all triangles +// By default, following vertex should be provided in counter-clockwise order +void DrawTriangleFan(const Vector2 *points, int pointCount, Color color) { - DrawEllipseV((Vector2){ (float)centerX, (float)centerY }, radiusH, radiusV, color); + if (pointCount >= 3) + { + rlSetTexture(GetShapesTexture().id); + Rectangle shapeRect = GetShapesTextureRectangle(); + + rlBegin(RL_QUADS); + rlColor4ub(color.r, color.g, color.b, color.a); + + for (int i = 1; i < pointCount - 1; i++) + { + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(points[0].x, points[0].y); + + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(points[i].x, points[i].y); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(points[i + 1].x, points[i + 1].y); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(points[i + 1].x, points[i + 1].y); + } + rlEnd(); + rlSetTexture(0); + } } -// Draw ellipse (Vector version) -void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color) +// Draw a triangle strip defined by points +// NOTE: Every new vertex connects with previous two +void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color) { - rlBegin(RL_TRIANGLES); - for (int i = 0; i < 360; i += 10) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x, center.y); - rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radiusH, center.y + sinf(DEG2RAD*(i + 10))*radiusV); - rlVertex2f(center.x + cosf(DEG2RAD*i)*radiusH, center.y + sinf(DEG2RAD*i)*radiusV); - } - rlEnd(); -} - -// Draw ellipse outline -void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color) -{ - DrawEllipseLinesV((Vector2){ (float)centerX, (float)centerY }, radiusH, radiusV, color); -} - -// Draw ellipse outline -void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color) -{ - rlBegin(RL_LINES); - for (int i = 0; i < 360; i += 10) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radiusH, center.y + sinf(DEG2RAD*(i + 10))*radiusV); - rlVertex2f(center.x + cosf(DEG2RAD*i)*radiusH, center.y + sinf(DEG2RAD*i)*radiusV); - } - rlEnd(); -} - -// Draw ring -void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) -{ - if (startAngle == endAngle) return; - - // Function expects (outerRadius > innerRadius) - if (outerRadius < innerRadius) + if (pointCount >= 3) { - float tmp = outerRadius; - outerRadius = innerRadius; - innerRadius = tmp; - - if (outerRadius <= 0.0f) outerRadius = 0.1f; - } - - // Function expects (endAngle > startAngle) - if (endAngle < startAngle) - { - // Swap values - float tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } - - int minSegments = (int)ceilf((endAngle - startAngle)/90); - - if (segments < minSegments) - { - // Calculate the maximum angle between segments based on the error rate (usually 0.5f) - float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/outerRadius, 2) - 1); - segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); - - if (segments <= 0) segments = minSegments; - } - - // Not a ring - if (innerRadius <= 0.0f) - { - DrawCircleSector(center, outerRadius, startAngle, endAngle, segments, color); - return; - } - - float stepLength = (endAngle - startAngle)/(float)segments; - float angle = startAngle; - -#if SUPPORT_QUADS_DRAW_MODE - rlSetTexture(GetShapesTexture().id); - Rectangle shapeRect = GetShapesTextureRectangle(); - - rlBegin(RL_QUADS); - for (int i = 0; i < segments; i++) - { + rlBegin(RL_TRIANGLES); rlColor4ub(color.r, color.g, color.b, color.a); - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); - - angle += stepLength; - } - rlEnd(); - - rlSetTexture(0); -#else - rlBegin(RL_TRIANGLES); - for (int i = 0; i < segments; i++) - { - rlColor4ub(color.r, color.g, color.b, color.a); - - rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - - angle += stepLength; - } - rlEnd(); -#endif -} - -// Draw ring outline -void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) -{ - if (startAngle == endAngle) return; - - // Function expects (outerRadius > innerRadius) - if (outerRadius < innerRadius) - { - float tmp = outerRadius; - outerRadius = innerRadius; - innerRadius = tmp; - - if (outerRadius <= 0.0f) outerRadius = 0.1f; + for (int i = 2; i < pointCount; i++) + { + if ((i%2) == 0) + { + rlVertex2f(points[i].x, points[i].y); + rlVertex2f(points[i - 2].x, points[i - 2].y); + rlVertex2f(points[i - 1].x, points[i - 1].y); + } + else + { + rlVertex2f(points[i].x, points[i].y); + rlVertex2f(points[i - 1].x, points[i - 1].y); + rlVertex2f(points[i - 2].x, points[i - 2].y); + } + } + rlEnd(); } - - // Function expects (endAngle > startAngle) - if (endAngle < startAngle) - { - // Swap values - float tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } - - int minSegments = (int)ceilf((endAngle - startAngle)/90); - - if (segments < minSegments) - { - // Calculate the maximum angle between segments based on the error rate (usually 0.5f) - float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/outerRadius, 2) - 1); - segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); - - if (segments <= 0) segments = minSegments; - } - - if (innerRadius <= 0.0f) - { - DrawCircleSectorLines(center, outerRadius, startAngle, endAngle, segments, color); - return; - } - - float stepLength = (endAngle - startAngle)/(float)segments; - float angle = startAngle; - bool showCapLines = true; - - rlBegin(RL_LINES); - if (showCapLines) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); - } - - for (int i = 0; i < segments; i++) - { - rlColor4ub(color.r, color.g, color.b, color.a); - - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); - - rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); - - angle += stepLength; - } - - if (showCapLines) - { - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); - rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); - } - rlEnd(); } // Draw a color-filled rectangle @@ -827,8 +547,8 @@ void DrawRectangleGradientH(int posX, int posY, int width, int height, Color lef DrawRectangleGradientEx((Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, left, left, right, right); } -// Draw a gradient-filled rectangle -void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight) +// Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order +void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4) { rlSetTexture(GetShapesTexture().id); Rectangle shapeRect = GetShapesTextureRectangle(); @@ -837,19 +557,19 @@ void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Col rlNormal3f(0.0f, 0.0f, 1.0f); // NOTE: Default raylib font character 95 is a white square - rlColor4ub(topLeft.r, topLeft.g, topLeft.b, topLeft.a); + rlColor4ub(col1.r, col1.g, col1.b, col1.a); rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); rlVertex2f(rec.x, rec.y); - rlColor4ub(bottomLeft.r, bottomLeft.g, bottomLeft.b, bottomLeft.a); + rlColor4ub(col2.r, col2.g, col2.b, col2.a); rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); rlVertex2f(rec.x, rec.y + rec.height); - rlColor4ub(bottomRight.r, bottomRight.g, bottomRight.b, bottomRight.a); + rlColor4ub(col3.r, col3.g, col3.b, col3.a); rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); rlVertex2f(rec.x + rec.width, rec.y + rec.height); - rlColor4ub(topRight.r, topRight.g, topRight.b, topRight.a); + rlColor4ub(col4.r, col4.g, col4.b, col4.a); rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); rlVertex2f(rec.x + rec.width, rec.y); rlEnd(); @@ -908,16 +628,16 @@ void DrawRectangleLines(int posX, int posY, int width, int height, Color color) */ } -// Draw rectangle outline with extended parameters -void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) +// Draw rectangle outline with line thickness +void DrawRectangleLinesEx(Rectangle rec, float thick, Color color) { - if ((lineThick > rec.width) || (lineThick > rec.height)) + if ((thick > rec.width) || (thick > rec.height)) { - if (rec.width >= rec.height) lineThick = rec.height/2; - else if (rec.width <= rec.height) lineThick = rec.width/2; + if (rec.width >= rec.height) thick = rec.height/2; + else if (rec.width <= rec.height) thick = rec.width/2; } - // When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following + // When rec = { x, y, 8.0f, 6.0f } and thick = 2, the following // four rectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight): // // TTTTTTTT @@ -928,10 +648,10 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) // BBBBBBBB // - Rectangle top = { rec.x, rec.y, rec.width, lineThick }; - Rectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick }; - Rectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; - Rectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; + Rectangle top = { rec.x, rec.y, rec.width, thick }; + Rectangle bottom = { rec.x, rec.y - thick + rec.height, rec.width, thick }; + Rectangle left = { rec.x, rec.y + thick, thick, rec.height - thick*2.0f }; + Rectangle right = { rec.x - thick + rec.width, rec.y + thick, thick, rec.height - thick*2.0f }; DrawRectangleRec(top, color); DrawRectangleRec(bottom, color); @@ -1172,15 +892,15 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Col DrawRectangleRoundedLinesEx(rec, roundness, segments, 1.0f, color); } -// Draw rectangle with rounded edges outline -void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color) +// Draw rectangle with rounded edges outline with line thickness +void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float thick, Color color) { - if (lineThick < 0) lineThick = 0; + if (thick < 0) thick = 0; // Not a rounded rectangle if (roundness <= 0.0f) { - DrawRectangleLinesEx((Rectangle){rec.x-lineThick, rec.y-lineThick, rec.width+2*lineThick, rec.height+2*lineThick}, lineThick, color); + DrawRectangleLinesEx((Rectangle){rec.x - thick, rec.y - thick, rec.width + 2*thick, rec.height + 2*thick}, thick, color); return; } @@ -1200,7 +920,7 @@ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, f } float stepLength = 90.0f/(float)segments; - const float outerRadius = radius + lineThick, innerRadius = radius; + const float outerRadius = radius + thick, innerRadius = radius; /* Quick sketch to make sense of all of this, @@ -1219,14 +939,14 @@ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, f P5 ================== P4 */ const Vector2 point[16] = { - {(float)rec.x + innerRadius + 0.5f, rec.y - lineThick + 0.5f}, - {(float)(rec.x + rec.width) - innerRadius - 0.5f, rec.y - lineThick + 0.5f}, - {rec.x + rec.width + lineThick - 0.5f, (float)rec.y + innerRadius + 0.5f}, // PO, P1, P2 - {rec.x + rec.width + lineThick - 0.5f, (float)(rec.y + rec.height) - innerRadius - 0.5f}, - {(float)(rec.x + rec.width) - innerRadius - 0.5f, rec.y + rec.height + lineThick - 0.5f}, // P3, P4 - {(float)rec.x + innerRadius + 0.5f, rec.y + rec.height + lineThick - 0.5f}, - {rec.x - lineThick + 0.5f, (float)(rec.y + rec.height) - innerRadius - 0.5f}, - {rec.x - lineThick + 0.5f, (float)rec.y + innerRadius + 0.5f}, // P5, P6, P7 + {(float)rec.x + innerRadius + 0.5f, rec.y - thick + 0.5f}, + {(float)(rec.x + rec.width) - innerRadius - 0.5f, rec.y - thick + 0.5f}, + {rec.x + rec.width + thick - 0.5f, (float)rec.y + innerRadius + 0.5f}, // PO, P1, P2 + {rec.x + rec.width + thick - 0.5f, (float)(rec.y + rec.height) - innerRadius - 0.5f}, + {(float)(rec.x + rec.width) - innerRadius - 0.5f, rec.y + rec.height + thick - 0.5f}, // P3, P4 + {(float)rec.x + innerRadius + 0.5f, rec.y + rec.height + thick - 0.5f}, + {rec.x - thick + 0.5f, (float)(rec.y + rec.height) - innerRadius - 0.5f}, + {rec.x - thick + 0.5f, (float)rec.y + innerRadius + 0.5f}, // P5, P6, P7 {(float)rec.x + innerRadius + 0.5f, rec.y + 0.5f}, {(float)(rec.x + rec.width) - innerRadius - 0.5f, rec.y + 0.5f}, // P8, P9 {rec.x + rec.width - 0.5f, (float)rec.y + innerRadius + 0.5f}, @@ -1246,7 +966,7 @@ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, f const float angles[4] = { 180.0f, 270.0f, 0.0f, 90.0f }; - if (lineThick > 1) + if (thick > 1) { #if SUPPORT_QUADS_DRAW_MODE rlSetTexture(GetShapesTexture().id); @@ -1418,130 +1138,6 @@ void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, f } } -// Draw a triangle -// NOTE: Vertex must be provided in counter-clockwise order -void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color) -{ - DrawTriangleGradient(v1, v2, v3, color, color, color); -} - -// Draw triangle with interpolated colors (vertex in counter-clockwise order!) -void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3) -{ -#if SUPPORT_QUADS_DRAW_MODE - rlSetTexture(GetShapesTexture().id); - Rectangle shapeRect = GetShapesTextureRectangle(); - - rlBegin(RL_QUADS); - rlNormal3f(0.0f, 0.0f, 1.0f); - - rlColor4ub(c1.r, c1.g, c1.b, c1.a); - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(v1.x, v1.y); - - rlColor4ub(c2.r, c2.g, c2.b, c2.a); - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(v2.x, v2.y); - - rlColor4ub(c3.r, c3.g, c3.b, c3.a); - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(v3.x, v3.y); - - rlColor4ub(c3.r, c3.g, c3.b, c3.a); - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(v3.x, v3.y); - rlEnd(); - - rlSetTexture(0); -#else - rlBegin(RL_TRIANGLES); - rlColor4ub(c1.r, c1.g, c1.b, c1.a); - rlVertex2f(v1.x, v1.y); - rlColor4ub(c2.r, c2.g, c2.b, c2.a); - rlVertex2f(v2.x, v2.y); - rlColor4ub(c3.r, c3.g, c3.b, c3.a); - rlVertex2f(v3.x, v3.y); - rlEnd(); -#endif -} - -// Draw a triangle using lines -// NOTE: Vertex must be provided in counter-clockwise order -void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color) -{ - rlBegin(RL_LINES); - rlColor4ub(color.r, color.g, color.b, color.a); - rlVertex2f(v1.x, v1.y); - rlVertex2f(v2.x, v2.y); - - rlVertex2f(v2.x, v2.y); - rlVertex2f(v3.x, v3.y); - - rlVertex2f(v3.x, v3.y); - rlVertex2f(v1.x, v1.y); - rlEnd(); -} - -// Draw a triangle fan defined by points -// NOTE: First vertex provided is the center, shared by all triangles -// By default, following vertex should be provided in counter-clockwise order -void DrawTriangleFan(const Vector2 *points, int pointCount, Color color) -{ - if (pointCount >= 3) - { - rlSetTexture(GetShapesTexture().id); - Rectangle shapeRect = GetShapesTextureRectangle(); - - rlBegin(RL_QUADS); - rlColor4ub(color.r, color.g, color.b, color.a); - - for (int i = 1; i < pointCount - 1; i++) - { - rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(points[0].x, points[0].y); - - rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(points[i].x, points[i].y); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); - rlVertex2f(points[i + 1].x, points[i + 1].y); - - rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); - rlVertex2f(points[i + 1].x, points[i + 1].y); - } - rlEnd(); - rlSetTexture(0); - } -} - -// Draw a triangle strip defined by points -// NOTE: Every new vertex connects with previous two -void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color) -{ - if (pointCount >= 3) - { - rlBegin(RL_TRIANGLES); - rlColor4ub(color.r, color.g, color.b, color.a); - - for (int i = 2; i < pointCount; i++) - { - if ((i%2) == 0) - { - rlVertex2f(points[i].x, points[i].y); - rlVertex2f(points[i - 2].x, points[i - 2].y); - rlVertex2f(points[i - 1].x, points[i - 1].y); - } - else - { - rlVertex2f(points[i].x, points[i].y); - rlVertex2f(points[i - 1].x, points[i - 1].y); - rlVertex2f(points[i - 2].x, points[i - 2].y); - } - } - rlEnd(); - } -} - // Draw a polygon of n sides void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color) { @@ -1611,12 +1207,12 @@ void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Colo rlEnd(); } -void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color) +void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float thick, Color color) { if (sides < 3) sides = 3; float centralAngle = rotation*DEG2RAD; float exteriorAngle = 360.0f/(float)sides*DEG2RAD; - float innerRadius = radius - (lineThick*cosf(DEG2RAD*exteriorAngle/2.0f)); + float innerRadius = radius - (thick*cosf(DEG2RAD*exteriorAngle/2.0f)); #if SUPPORT_QUADS_DRAW_MODE rlSetTexture(GetShapesTexture().id); @@ -1665,6 +1261,415 @@ void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, fl #endif } +// Draw a color-filled circle +void DrawCircle(int centerX, int centerY, float radius, Color color) +{ + DrawCircleV((Vector2){ (float)centerX, (float)centerY }, radius, color); +} + +// Draw a color-filled circle (Vector version) +// NOTE: On OpenGL 3.3 and ES2 using QUADS to avoid drawing order issues +void DrawCircleV(Vector2 center, float radius, Color color) +{ + DrawCircleSector(center, radius, 0, 360, 36, color); +} + +// Draw a gradient-filled circle +void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer) +{ + rlBegin(RL_TRIANGLES); + for (int i = 0; i < 360; i += 10) + { + rlColor4ub(inner.r, inner.g, inner.b, inner.a); + rlVertex2f(center.x, center.y); + rlColor4ub(outer.r, outer.g, outer.b, outer.a); + rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radius, center.y + sinf(DEG2RAD*(i + 10))*radius); + rlColor4ub(outer.r, outer.g, outer.b, outer.a); + rlVertex2f(center.x + cosf(DEG2RAD*i)*radius, center.y + sinf(DEG2RAD*i)*radius); + } + rlEnd(); +} + +// Draw a piece of a circle +void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) +{ + if (startAngle == endAngle) return; + if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero + + // Function expects (endAngle > startAngle) + if (endAngle < startAngle) + { + // Swap values + float tmp = startAngle; + startAngle = endAngle; + endAngle = tmp; + } + + int minSegments = (int)ceilf((endAngle - startAngle)/90); + + if (segments < minSegments) + { + // Calculate the maximum angle between segments based on the error rate (usually 0.5f) + float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1); + segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); + + if (segments <= 0) segments = minSegments; + } + + float stepLength = (endAngle - startAngle)/(float)segments; + float angle = startAngle; + +#if SUPPORT_QUADS_DRAW_MODE + rlSetTexture(GetShapesTexture().id); + Rectangle shapeRect = GetShapesTextureRectangle(); + + rlBegin(RL_QUADS); + + // NOTE: Every QUAD actually represents two segments + for (int i = 0; i < segments/2; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x, center.y); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength*2.0f))*radius, center.y + sinf(DEG2RAD*(angle + stepLength*2.0f))*radius); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); + + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + + angle += (stepLength*2.0f); + } + + // NOTE: In case number of segments is odd, adding one last piece to the cake + if ((((unsigned int)segments)%2) == 1) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x, center.y); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); + + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x, center.y); + } + + rlEnd(); + + rlSetTexture(0); +#else + rlBegin(RL_TRIANGLES); + for (int i = 0; i < segments; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlVertex2f(center.x, center.y); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + + angle += stepLength; + } + rlEnd(); +#endif +} + +// Draw a piece of a circle outlines +void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color) +{ + if (startAngle == endAngle) return; + if (radius <= 0.0f) radius = 0.1f; // Avoid div by zero issue + + // Function expects (endAngle > startAngle) + if (endAngle < startAngle) + { + // Swap values + float tmp = startAngle; + startAngle = endAngle; + endAngle = tmp; + } + + int minSegments = (int)ceilf((endAngle - startAngle)/90); + + if (segments < minSegments) + { + // Calculate the maximum angle between segments based on the error rate (usually 0.5f) + float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/radius, 2) - 1); + segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); + + if (segments <= 0) segments = minSegments; + } + + float stepLength = (endAngle - startAngle)/(float)segments; + float angle = startAngle; + bool showCapLines = true; + + rlBegin(RL_LINES); + if (showCapLines) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x, center.y); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + } + + for (int i = 0; i < segments; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*radius, center.y + sinf(DEG2RAD*(angle + stepLength))*radius); + + angle += stepLength; + } + + if (showCapLines) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x, center.y); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*radius, center.y + sinf(DEG2RAD*angle)*radius); + } + rlEnd(); +} + +// Draw circle outline +void DrawCircleLines(int centerX, int centerY, float radius, Color color) +{ + DrawCircleLinesV((Vector2){ (float)centerX, (float)centerY }, radius, color); +} + +// Draw circle outline (Vector version) +void DrawCircleLinesV(Vector2 center, float radius, Color color) +{ + rlBegin(RL_LINES); + rlColor4ub(color.r, color.g, color.b, color.a); + + // NOTE: Circle outline is drawn pixel by pixel every degree (0 to 360) + for (int i = 0; i < 360; i += 10) + { + rlVertex2f(center.x + cosf(DEG2RAD*i)*radius, center.y + sinf(DEG2RAD*i)*radius); + rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radius, center.y + sinf(DEG2RAD*(i + 10))*radius); + } + rlEnd(); +} + +void DrawCircleLinesEx(Vector2 center, float radius, float thick, Color color) +{ + DrawRing(center, radius - thick, radius, 0.0f, 360.0f, 36, color); +} + +// Draw ellipse +void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color) +{ + DrawEllipseV((Vector2){ (float)centerX, (float)centerY }, radiusH, radiusV, color); +} + +// Draw ellipse (Vector version) +void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color) +{ + rlBegin(RL_TRIANGLES); + for (int i = 0; i < 360; i += 10) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x, center.y); + rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radiusH, center.y + sinf(DEG2RAD*(i + 10))*radiusV); + rlVertex2f(center.x + cosf(DEG2RAD*i)*radiusH, center.y + sinf(DEG2RAD*i)*radiusV); + } + rlEnd(); +} + +// Draw ellipse outline +void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color) +{ + DrawEllipseLinesV((Vector2){ (float)centerX, (float)centerY }, radiusH, radiusV, color); +} + +// Draw ellipse outline +void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color) +{ + rlBegin(RL_LINES); + for (int i = 0; i < 360; i += 10) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x + cosf(DEG2RAD*(i + 10))*radiusH, center.y + sinf(DEG2RAD*(i + 10))*radiusV); + rlVertex2f(center.x + cosf(DEG2RAD*i)*radiusH, center.y + sinf(DEG2RAD*i)*radiusV); + } + rlEnd(); +} + +// Draw ring +void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) +{ + if (startAngle == endAngle) return; + + // Function expects (outerRadius > innerRadius) + if (outerRadius < innerRadius) + { + float tmp = outerRadius; + outerRadius = innerRadius; + innerRadius = tmp; + + if (outerRadius <= 0.0f) outerRadius = 0.1f; + } + + // Function expects (endAngle > startAngle) + if (endAngle < startAngle) + { + // Swap values + float tmp = startAngle; + startAngle = endAngle; + endAngle = tmp; + } + + int minSegments = (int)ceilf((endAngle - startAngle)/90); + + if (segments < minSegments) + { + // Calculate the maximum angle between segments based on the error rate (usually 0.5f) + float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/outerRadius, 2) - 1); + segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); + + if (segments <= 0) segments = minSegments; + } + + // Not a ring + if (innerRadius <= 0.0f) + { + DrawCircleSector(center, outerRadius, startAngle, endAngle, segments, color); + return; + } + + float stepLength = (endAngle - startAngle)/(float)segments; + float angle = startAngle; + +#if SUPPORT_QUADS_DRAW_MODE + rlSetTexture(GetShapesTexture().id); + Rectangle shapeRect = GetShapesTextureRectangle(); + + rlBegin(RL_QUADS); + for (int i = 0; i < segments; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlTexCoord2f(shapeRect.x/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + + rlTexCoord2f(shapeRect.x/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, shapeRect.y/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); + + rlTexCoord2f((shapeRect.x + shapeRect.width)/texShapes.width, (shapeRect.y + shapeRect.height)/texShapes.height); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); + + angle += stepLength; + } + rlEnd(); + + rlSetTexture(0); +#else + rlBegin(RL_TRIANGLES); + for (int i = 0; i < segments; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + + angle += stepLength; + } + rlEnd(); +#endif +} + +// Draw ring outline +void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color) +{ + if (startAngle == endAngle) return; + + // Function expects (outerRadius > innerRadius) + if (outerRadius < innerRadius) + { + float tmp = outerRadius; + outerRadius = innerRadius; + innerRadius = tmp; + + if (outerRadius <= 0.0f) outerRadius = 0.1f; + } + + // Function expects (endAngle > startAngle) + if (endAngle < startAngle) + { + // Swap values + float tmp = startAngle; + startAngle = endAngle; + endAngle = tmp; + } + + int minSegments = (int)ceilf((endAngle - startAngle)/90); + + if (segments < minSegments) + { + // Calculate the maximum angle between segments based on the error rate (usually 0.5f) + float th = acosf(2*powf(1 - SMOOTH_CIRCLE_ERROR_RATE/outerRadius, 2) - 1); + segments = (int)ceilf((endAngle - startAngle)*(2*PI/th)/360.0f); + + if (segments <= 0) segments = minSegments; + } + + if (innerRadius <= 0.0f) + { + DrawCircleSectorLines(center, outerRadius, startAngle, endAngle, segments, color); + return; + } + + float stepLength = (endAngle - startAngle)/(float)segments; + float angle = startAngle; + bool showCapLines = true; + + rlBegin(RL_LINES); + if (showCapLines) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); + } + + for (int i = 0; i < segments; i++) + { + rlColor4ub(color.r, color.g, color.b, color.a); + + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*outerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*outerRadius); + + rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*(angle + stepLength))*innerRadius, center.y + sinf(DEG2RAD*(angle + stepLength))*innerRadius); + + angle += stepLength; + } + + if (showCapLines) + { + rlColor4ub(color.r, color.g, color.b, color.a); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*outerRadius, center.y + sinf(DEG2RAD*angle)*outerRadius); + rlVertex2f(center.x + cosf(DEG2RAD*angle)*innerRadius, center.y + sinf(DEG2RAD*angle)*innerRadius); + } + rlEnd(); +} + //---------------------------------------------------------------------------------- // Module Functions Definition - Splines functions //---------------------------------------------------------------------------------- diff --git a/src/rtext.c b/src/rtext.c index f1de75421..a7f715ba3 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -327,7 +327,7 @@ extern void UnloadFontDefault(void) defaultFont.recs = NULL; } -// Get the default font, useful to be used with extended parameters +// Get the default font Font GetFontDefault() { return defaultFont; @@ -381,9 +381,9 @@ Font LoadFont(const char *fileName) return font; } -// Load Font from TTF or BDF font file with generation parameters -// NOTE: You can pass an array with desired characters, those characters should be available in the font -// if array is NULL, default char set is selected 32..126 +// Load font from file with defined codepoints and generation size +// NOTE: NULL for codepoints and 0 for codepointCount to load the default character set (32..126), +// font size is provided in pixels height Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount) { Font font = { 0 }; @@ -2673,7 +2673,7 @@ static Font LoadBMFont(const char *fileName) { Rectangle srcRec = { 0.0f, 0.0f, (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); } } diff --git a/src/rtextures.c b/src/rtextures.c index 9a359f0f2..5b85401ee 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -1500,7 +1500,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co 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 }; - 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); @@ -3609,144 +3610,15 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co } } -// Draw circle within an image -void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color) +// Draw a lines sequence within an image +void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color) { - int x = 0; - int y = radius; - int decesionParameter = 3 - 2*radius; - - while (y >= x) + for (int i = 0; i < pointCount - 1; i++) { - 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; + ImageDrawLineV(dst, points[i], points[i + 1], color); } } -// 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 void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color) { @@ -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 -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 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: same src/dst format with no alpha -> direct line copy // [-] 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 colDst = { 0 }; @@ -4079,7 +4111,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color mipmapDstRec.x /= 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 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); } @@ -4232,7 +4264,7 @@ TextureCubemap LoadTextureCubemap(Image image, int layout) 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); } @@ -4488,7 +4520,7 @@ void DrawTextureV(Texture2D texture, Vector2 position, Color 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) { Rectangle srcrec = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; diff --git a/tools/rlparser/output/raylib_api.json b/tools/rlparser/output/raylib_api.json index 0da5fc3e0..f26dac263 100644 --- a/tools/rlparser/output/raylib_api.json +++ b/tools/rlparser/output/raylib_api.json @@ -335,12 +335,6 @@ "type": "UNKNOWN", "value": "SHADER_LOC_MAP_METALNESS", "description": "" - }, - { - "name": "GetMouseRay", - "type": "UNKNOWN", - "value": "GetScreenToWorldRay", - "description": "Compatibility hack for previous raylib versions" } ], "structs": [ @@ -5675,6 +5669,498 @@ } ] }, + { + "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", "description": "Draw a color-filled circle", @@ -5844,6 +6330,29 @@ } ] }, + { + "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", "description": "Draw ellipse", @@ -6014,498 +6523,6 @@ } ] }, - { - "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", "description": "Draw spline: Linear, minimum 2 points", @@ -8208,8 +8225,8 @@ ] }, { - "name": "ImageDrawCircle", - "description": "Draw a filled circle within an image", + "name": "ImageDrawLineStrip", + "description": "Draw a lines sequence within an image", "returnType": "void", "params": [ { @@ -8217,216 +8234,12 @@ "name": "dst" }, { - "type": "int", - "name": "centerX" + "type": "const Vector2 *", + "name": "points" }, { "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": "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" + "name": "pointCount" }, { "type": "Color", @@ -8570,8 +8383,316 @@ ] }, { - "name": "ImageDraw", - "description": "Draw a source image within a destination image (tint applied to source)", + "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 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", "params": [ { @@ -8590,6 +8711,14 @@ "type": "Rectangle", "name": "dstRec" }, + { + "type": "Vector2", + "name": "origin" + }, + { + "type": "float", + "name": "rotation" + }, { "type": "Color", "name": "tint" @@ -8877,7 +9006,7 @@ }, { "name": "DrawTextureEx", - "description": "Draw a Texture2D with extended parameters", + "description": "Draw a Texture2D with rotation and scale", "returnType": "void", "params": [ { @@ -9260,7 +9389,7 @@ }, { "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", "params": [ { @@ -10336,7 +10465,7 @@ }, { "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", "params": [ { @@ -10489,7 +10618,7 @@ }, { "name": "DrawSphereEx", - "description": "Draw sphere with extended parameters", + "description": "Draw sphere with defined rings and slices", "returnType": "void", "params": [ { @@ -10856,7 +10985,7 @@ }, { "name": "DrawModelEx", - "description": "Draw a model with extended parameters", + "description": "Draw a model with custom transform", "returnType": "void", "params": [ { @@ -10910,7 +11039,7 @@ }, { "name": "DrawModelWiresEx", - "description": "Draw a model wires (with texture if set) with extended parameters", + "description": "Draw a model wires with custom transform", "returnType": "void", "params": [ { diff --git a/tools/rlparser/output/raylib_api.lua b/tools/rlparser/output/raylib_api.lua index 6fa5d9321..8c26fcac6 100644 --- a/tools/rlparser/output/raylib_api.lua +++ b/tools/rlparser/output/raylib_api.lua @@ -335,12 +335,6 @@ return { type = "UNKNOWN", value = "SHADER_LOC_MAP_METALNESS", description = "" - }, - { - name = "GetMouseRay", - type = "UNKNOWN", - value = "GetScreenToWorldRay", - description = "Compatibility hack for previous raylib versions" } }, structs = { @@ -4850,6 +4844,234 @@ return { {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", description = "Draw a color-filled circle", @@ -4929,6 +5151,17 @@ return { {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", description = "Draw ellipse", @@ -5003,234 +5236,6 @@ return { {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", description = "Draw spline: Linear, minimum 2 points", @@ -6123,106 +6128,13 @@ return { } }, { - name = "ImageDrawCircle", - description = "Draw a filled circle within an image", + name = "ImageDrawLineStrip", + description = "Draw a lines sequence 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 = "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 = "const Vector2 *", name = "points"}, + {type = "int", name = "pointCount"}, {type = "Color", name = "color"} } }, @@ -6287,14 +6199,156 @@ return { } }, { - name = "ImageDraw", - description = "Draw a source image within a destination image (tint applied to source)", + 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 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", params = { {type = "Image *", name = "dst"}, {type = "Image", name = "src"}, {type = "Rectangle", name = "srcRec"}, {type = "Rectangle", name = "dstRec"}, + {type = "Vector2", name = "origin"}, + {type = "float", name = "rotation"}, {type = "Color", name = "tint"} } }, @@ -6459,7 +6513,7 @@ return { }, { name = "DrawTextureEx", - description = "Draw a Texture2D with extended parameters", + description = "Draw a Texture2D with rotation and scale", returnType = "void", params = { {type = "Texture2D", name = "texture"}, @@ -6674,7 +6728,7 @@ return { }, { 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", params = { {type = "const char *", name = "fileName"}, @@ -7258,7 +7312,7 @@ return { }, { 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", params = { {type = "Vector3", name = "v1"}, @@ -7333,7 +7387,7 @@ return { }, { name = "DrawSphereEx", - description = "Draw sphere with extended parameters", + description = "Draw sphere with defined rings and slices", returnType = "void", params = { {type = "Vector3", name = "centerPos"}, @@ -7514,7 +7568,7 @@ return { }, { name = "DrawModelEx", - description = "Draw a model with extended parameters", + description = "Draw a model with custom transform", returnType = "void", params = { {type = "Model", name = "model"}, @@ -7538,7 +7592,7 @@ return { }, { name = "DrawModelWiresEx", - description = "Draw a model wires (with texture if set) with extended parameters", + description = "Draw a model wires with custom transform", returnType = "void", params = { {type = "Model", name = "model"}, diff --git a/tools/rlparser/output/raylib_api.txt b/tools/rlparser/output/raylib_api.txt index 97d2350c0..52fd63710 100644 --- a/tools/rlparser/output/raylib_api.txt +++ b/tools/rlparser/output/raylib_api.txt @@ -1,5 +1,5 @@ -Defines found: 57 +Defines found: 56 Define 001: RAYLIB_H Name: RAYLIB_H @@ -281,11 +281,6 @@ Define 056: SHADER_LOC_MAP_SPECULAR Type: UNKNOWN Value: SHADER_LOC_MAP_METALNESS Description: -Define 057: GetMouseRay - Name: GetMouseRay - Type: UNKNOWN - Value: GetScreenToWorldRay - Description: Compatibility hack for previous raylib versions Structures found: 35 @@ -1000,7 +995,7 @@ Callback 006: AudioCallback() (2 input parameters) Param[1]: bufferData (type: void *) Param[2]: frames (type: unsigned int) -Functions found: 602 +Functions found: 607 Function 001: InitWindow() (3 input parameters) Name: InitWindow @@ -2254,7 +2249,175 @@ Function 229: DrawLineDashed() (5 input parameters) Param[3]: dashSize (type: int) Param[4]: spaceSize (type: int) Param[5]: color (type: Color) -Function 230: DrawCircle() (4 input parameters) +Function 230: DrawTriangle() (4 input parameters) + Name: DrawTriangle + Return type: void + Description: Draw a color-filled triangle, counter-clockwise vertex order + Param[1]: v1 (type: Vector2) + Param[2]: v2 (type: Vector2) + Param[3]: v3 (type: Vector2) + Param[4]: color (type: Color) +Function 231: DrawTriangleGradient() (6 input parameters) + Name: DrawTriangleGradient + Return type: void + Description: Draw triangle with interpolated colors, counter-clockwise vertex/color order + Param[1]: v1 (type: Vector2) + Param[2]: v2 (type: Vector2) + Param[3]: v3 (type: Vector2) + Param[4]: c1 (type: Color) + Param[5]: c2 (type: Color) + Param[6]: c3 (type: Color) +Function 232: DrawTriangleLines() (4 input parameters) + Name: DrawTriangleLines + Return type: void + Description: Draw triangle outline, counter-clockwise vertex order + Param[1]: v1 (type: Vector2) + Param[2]: v2 (type: Vector2) + Param[3]: v3 (type: Vector2) + Param[4]: color (type: Color) +Function 233: DrawTriangleFan() (3 input parameters) + Name: DrawTriangleFan + Return type: void + Description: Draw a triangle fan defined by points (first vertex is the center) + Param[1]: points (type: const Vector2 *) + Param[2]: pointCount (type: int) + Param[3]: color (type: Color) +Function 234: DrawTriangleStrip() (3 input parameters) + Name: DrawTriangleStrip + Return type: void + Description: Draw a triangle strip defined by points + Param[1]: points (type: const Vector2 *) + Param[2]: pointCount (type: int) + Param[3]: color (type: Color) +Function 235: DrawRectangle() (5 input parameters) + Name: DrawRectangle + Return type: void + Description: Draw a color-filled rectangle + Param[1]: posX (type: int) + Param[2]: posY (type: int) + Param[3]: width (type: int) + Param[4]: height (type: int) + Param[5]: color (type: Color) +Function 236: DrawRectangleV() (3 input parameters) + Name: DrawRectangleV + Return type: void + Description: Draw a color-filled rectangle (Vector version) + Param[1]: position (type: Vector2) + Param[2]: size (type: Vector2) + Param[3]: color (type: Color) +Function 237: DrawRectangleRec() (2 input parameters) + Name: DrawRectangleRec + Return type: void + Description: Draw a color-filled rectangle + Param[1]: rec (type: Rectangle) + Param[2]: color (type: Color) +Function 238: DrawRectanglePro() (4 input parameters) + Name: DrawRectanglePro + Return type: void + Description: Draw a color-filled rectangle with pro parameters + Param[1]: rec (type: Rectangle) + Param[2]: origin (type: Vector2) + Param[3]: rotation (type: float) + Param[4]: color (type: Color) +Function 239: DrawRectangleGradientV() (6 input parameters) + Name: DrawRectangleGradientV + Return type: void + Description: Draw a vertical-gradient-filled rectangle + Param[1]: posX (type: int) + Param[2]: posY (type: int) + Param[3]: width (type: int) + Param[4]: height (type: int) + Param[5]: top (type: Color) + Param[6]: bottom (type: Color) +Function 240: DrawRectangleGradientH() (6 input parameters) + Name: DrawRectangleGradientH + Return type: void + Description: Draw a horizontal-gradient-filled rectangle + Param[1]: posX (type: int) + Param[2]: posY (type: int) + Param[3]: width (type: int) + Param[4]: height (type: int) + Param[5]: left (type: Color) + Param[6]: right (type: Color) +Function 241: DrawRectangleGradientEx() (5 input parameters) + Name: DrawRectangleGradientEx + Return type: void + Description: Draw a gradient-filled rectangle with custom vertex colors, counter-clockwise color order + Param[1]: rec (type: Rectangle) + Param[2]: col1 (type: Color) + Param[3]: col2 (type: Color) + Param[4]: col3 (type: Color) + Param[5]: col4 (type: Color) +Function 242: DrawRectangleLines() (5 input parameters) + Name: DrawRectangleLines + Return type: void + Description: Draw rectangle outline + Param[1]: posX (type: int) + Param[2]: posY (type: int) + Param[3]: width (type: int) + Param[4]: height (type: int) + Param[5]: color (type: Color) +Function 243: DrawRectangleLinesEx() (3 input parameters) + Name: DrawRectangleLinesEx + Return type: void + Description: Draw rectangle outline with line thickness + Param[1]: rec (type: Rectangle) + Param[2]: thick (type: float) + Param[3]: color (type: Color) +Function 244: DrawRectangleRounded() (4 input parameters) + Name: DrawRectangleRounded + Return type: void + Description: Draw rectangle with rounded edges + Param[1]: rec (type: Rectangle) + Param[2]: roundness (type: float) + Param[3]: segments (type: int) + Param[4]: color (type: Color) +Function 245: DrawRectangleRoundedLines() (4 input parameters) + Name: DrawRectangleRoundedLines + Return type: void + Description: Draw rectangle lines with rounded edges + Param[1]: rec (type: Rectangle) + Param[2]: roundness (type: float) + Param[3]: segments (type: int) + Param[4]: color (type: Color) +Function 246: DrawRectangleRoundedLinesEx() (5 input parameters) + Name: DrawRectangleRoundedLinesEx + Return type: void + Description: Draw rectangle lines with rounded edges outline and line thickness + Param[1]: rec (type: Rectangle) + Param[2]: roundness (type: float) + Param[3]: segments (type: int) + Param[4]: thick (type: float) + Param[5]: color (type: Color) +Function 247: DrawPoly() (5 input parameters) + Name: DrawPoly + Return type: void + Description: Draw a polygon of n sides + Param[1]: center (type: Vector2) + Param[2]: sides (type: int) + Param[3]: radius (type: float) + Param[4]: rotation (type: float) + Param[5]: color (type: Color) +Function 248: DrawPolyLines() (5 input parameters) + Name: DrawPolyLines + Return type: void + Description: Draw a polygon outline of n sides + Param[1]: center (type: Vector2) + Param[2]: sides (type: int) + Param[3]: radius (type: float) + Param[4]: rotation (type: float) + Param[5]: color (type: Color) +Function 249: DrawPolyLinesEx() (6 input parameters) + Name: DrawPolyLinesEx + Return type: void + Description: Draw a polygon outline of n sides with line thickness + Param[1]: center (type: Vector2) + Param[2]: sides (type: int) + Param[3]: radius (type: float) + Param[4]: rotation (type: float) + Param[5]: thick (type: float) + Param[6]: color (type: Color) +Function 250: DrawCircle() (4 input parameters) Name: DrawCircle Return type: void Description: Draw a color-filled circle @@ -2262,14 +2425,14 @@ Function 230: DrawCircle() (4 input parameters) Param[2]: centerY (type: int) Param[3]: radius (type: float) Param[4]: color (type: Color) -Function 231: DrawCircleV() (3 input parameters) +Function 251: DrawCircleV() (3 input parameters) Name: DrawCircleV Return type: void Description: Draw a color-filled circle (Vector version) Param[1]: center (type: Vector2) Param[2]: radius (type: float) Param[3]: color (type: Color) -Function 232: DrawCircleGradient() (4 input parameters) +Function 252: DrawCircleGradient() (4 input parameters) Name: DrawCircleGradient Return type: void Description: Draw a gradient-filled circle @@ -2277,7 +2440,7 @@ Function 232: DrawCircleGradient() (4 input parameters) Param[2]: radius (type: float) Param[3]: inner (type: Color) Param[4]: outer (type: Color) -Function 233: DrawCircleSector() (6 input parameters) +Function 253: DrawCircleSector() (6 input parameters) Name: DrawCircleSector Return type: void Description: Draw a piece of a circle @@ -2287,7 +2450,7 @@ Function 233: DrawCircleSector() (6 input parameters) Param[4]: endAngle (type: float) Param[5]: segments (type: int) Param[6]: color (type: Color) -Function 234: DrawCircleSectorLines() (6 input parameters) +Function 254: DrawCircleSectorLines() (6 input parameters) Name: DrawCircleSectorLines Return type: void Description: Draw circle sector outline @@ -2297,7 +2460,7 @@ Function 234: DrawCircleSectorLines() (6 input parameters) Param[4]: endAngle (type: float) Param[5]: segments (type: int) Param[6]: color (type: Color) -Function 235: DrawCircleLines() (4 input parameters) +Function 255: DrawCircleLines() (4 input parameters) Name: DrawCircleLines Return type: void Description: Draw circle outline @@ -2305,14 +2468,22 @@ Function 235: DrawCircleLines() (4 input parameters) Param[2]: centerY (type: int) Param[3]: radius (type: float) Param[4]: color (type: Color) -Function 236: DrawCircleLinesV() (3 input parameters) +Function 256: DrawCircleLinesV() (3 input parameters) Name: DrawCircleLinesV Return type: void Description: Draw circle outline (Vector version) Param[1]: center (type: Vector2) Param[2]: radius (type: float) Param[3]: color (type: Color) -Function 237: DrawEllipse() (5 input parameters) +Function 257: DrawCircleLinesEx() (4 input parameters) + Name: DrawCircleLinesEx + Return type: void + Description: Draw circle outline with line thickness + Param[1]: center (type: Vector2) + Param[2]: radius (type: float) + Param[3]: thick (type: float) + Param[4]: color (type: Color) +Function 258: DrawEllipse() (5 input parameters) Name: DrawEllipse Return type: void Description: Draw ellipse @@ -2321,7 +2492,7 @@ Function 237: DrawEllipse() (5 input parameters) Param[3]: radiusH (type: float) Param[4]: radiusV (type: float) Param[5]: color (type: Color) -Function 238: DrawEllipseV() (4 input parameters) +Function 259: DrawEllipseV() (4 input parameters) Name: DrawEllipseV Return type: void Description: Draw ellipse (Vector version) @@ -2329,7 +2500,7 @@ Function 238: DrawEllipseV() (4 input parameters) Param[2]: radiusH (type: float) Param[3]: radiusV (type: float) Param[4]: color (type: Color) -Function 239: DrawEllipseLines() (5 input parameters) +Function 260: DrawEllipseLines() (5 input parameters) Name: DrawEllipseLines Return type: void Description: Draw ellipse outline @@ -2338,7 +2509,7 @@ Function 239: DrawEllipseLines() (5 input parameters) Param[3]: radiusH (type: float) Param[4]: radiusV (type: float) Param[5]: color (type: Color) -Function 240: DrawEllipseLinesV() (4 input parameters) +Function 261: DrawEllipseLinesV() (4 input parameters) Name: DrawEllipseLinesV Return type: void Description: Draw ellipse outline (Vector version) @@ -2346,7 +2517,7 @@ Function 240: DrawEllipseLinesV() (4 input parameters) Param[2]: radiusH (type: float) Param[3]: radiusV (type: float) Param[4]: color (type: Color) -Function 241: DrawRing() (7 input parameters) +Function 262: DrawRing() (7 input parameters) Name: DrawRing Return type: void Description: Draw ring @@ -2357,7 +2528,7 @@ Function 241: DrawRing() (7 input parameters) Param[5]: endAngle (type: float) Param[6]: segments (type: int) Param[7]: color (type: Color) -Function 242: DrawRingLines() (7 input parameters) +Function 263: DrawRingLines() (7 input parameters) Name: DrawRingLines Return type: void Description: Draw ring outline @@ -2368,175 +2539,7 @@ Function 242: DrawRingLines() (7 input parameters) Param[5]: endAngle (type: float) Param[6]: segments (type: int) Param[7]: color (type: Color) -Function 243: DrawRectangle() (5 input parameters) - Name: DrawRectangle - Return type: void - Description: Draw a color-filled rectangle - Param[1]: posX (type: int) - Param[2]: posY (type: int) - Param[3]: width (type: int) - Param[4]: height (type: int) - Param[5]: color (type: Color) -Function 244: DrawRectangleV() (3 input parameters) - Name: DrawRectangleV - Return type: void - Description: Draw a color-filled rectangle (Vector version) - Param[1]: position (type: Vector2) - Param[2]: size (type: Vector2) - Param[3]: color (type: Color) -Function 245: DrawRectangleRec() (2 input parameters) - Name: DrawRectangleRec - Return type: void - Description: Draw a color-filled rectangle - Param[1]: rec (type: Rectangle) - Param[2]: color (type: Color) -Function 246: DrawRectanglePro() (4 input parameters) - Name: DrawRectanglePro - Return type: void - Description: Draw a color-filled rectangle with pro parameters - Param[1]: rec (type: Rectangle) - Param[2]: origin (type: Vector2) - Param[3]: rotation (type: float) - Param[4]: color (type: Color) -Function 247: DrawRectangleGradientV() (6 input parameters) - Name: DrawRectangleGradientV - Return type: void - Description: Draw a vertical-gradient-filled rectangle - Param[1]: posX (type: int) - Param[2]: posY (type: int) - Param[3]: width (type: int) - Param[4]: height (type: int) - Param[5]: top (type: Color) - Param[6]: bottom (type: Color) -Function 248: DrawRectangleGradientH() (6 input parameters) - Name: DrawRectangleGradientH - Return type: void - Description: Draw a horizontal-gradient-filled rectangle - Param[1]: posX (type: int) - Param[2]: posY (type: int) - Param[3]: width (type: int) - Param[4]: height (type: int) - Param[5]: left (type: Color) - Param[6]: right (type: Color) -Function 249: DrawRectangleGradientEx() (5 input parameters) - Name: DrawRectangleGradientEx - Return type: void - Description: Draw a gradient-filled rectangle with custom vertex colors - Param[1]: rec (type: Rectangle) - Param[2]: topLeft (type: Color) - Param[3]: bottomLeft (type: Color) - Param[4]: bottomRight (type: Color) - Param[5]: topRight (type: Color) -Function 250: DrawRectangleLines() (5 input parameters) - Name: DrawRectangleLines - Return type: void - Description: Draw rectangle outline - Param[1]: posX (type: int) - Param[2]: posY (type: int) - Param[3]: width (type: int) - Param[4]: height (type: int) - Param[5]: color (type: Color) -Function 251: DrawRectangleLinesEx() (3 input parameters) - Name: DrawRectangleLinesEx - Return type: void - Description: Draw rectangle outline with extended parameters - Param[1]: rec (type: Rectangle) - Param[2]: lineThick (type: float) - Param[3]: color (type: Color) -Function 252: DrawRectangleRounded() (4 input parameters) - Name: DrawRectangleRounded - Return type: void - Description: Draw rectangle with rounded edges - Param[1]: rec (type: Rectangle) - Param[2]: roundness (type: float) - Param[3]: segments (type: int) - Param[4]: color (type: Color) -Function 253: DrawRectangleRoundedLines() (4 input parameters) - Name: DrawRectangleRoundedLines - Return type: void - Description: Draw rectangle lines with rounded edges - Param[1]: rec (type: Rectangle) - Param[2]: roundness (type: float) - Param[3]: segments (type: int) - Param[4]: color (type: Color) -Function 254: DrawRectangleRoundedLinesEx() (5 input parameters) - Name: DrawRectangleRoundedLinesEx - Return type: void - Description: Draw rectangle lines with rounded edges outline - Param[1]: rec (type: Rectangle) - Param[2]: roundness (type: float) - Param[3]: segments (type: int) - Param[4]: lineThick (type: float) - Param[5]: color (type: Color) -Function 255: DrawTriangle() (4 input parameters) - Name: DrawTriangle - Return type: void - Description: Draw a color-filled triangle (vertex in counter-clockwise order!) - Param[1]: v1 (type: Vector2) - Param[2]: v2 (type: Vector2) - Param[3]: v3 (type: Vector2) - Param[4]: color (type: Color) -Function 256: DrawTriangleGradient() (6 input parameters) - Name: DrawTriangleGradient - Return type: void - Description: Draw triangle with interpolated colors (vertex in counter-clockwise order!) - Param[1]: v1 (type: Vector2) - Param[2]: v2 (type: Vector2) - Param[3]: v3 (type: Vector2) - Param[4]: c1 (type: Color) - Param[5]: c2 (type: Color) - Param[6]: c3 (type: Color) -Function 257: DrawTriangleLines() (4 input parameters) - Name: DrawTriangleLines - Return type: void - Description: Draw triangle outline (vertex in counter-clockwise order!) - Param[1]: v1 (type: Vector2) - Param[2]: v2 (type: Vector2) - Param[3]: v3 (type: Vector2) - Param[4]: color (type: Color) -Function 258: DrawTriangleFan() (3 input parameters) - Name: DrawTriangleFan - Return type: void - Description: Draw a triangle fan defined by points (first vertex is the center) - Param[1]: points (type: const Vector2 *) - Param[2]: pointCount (type: int) - Param[3]: color (type: Color) -Function 259: DrawTriangleStrip() (3 input parameters) - Name: DrawTriangleStrip - Return type: void - Description: Draw a triangle strip defined by points - Param[1]: points (type: const Vector2 *) - Param[2]: pointCount (type: int) - Param[3]: color (type: Color) -Function 260: DrawPoly() (5 input parameters) - Name: DrawPoly - Return type: void - Description: Draw a polygon of n sides - Param[1]: center (type: Vector2) - Param[2]: sides (type: int) - Param[3]: radius (type: float) - Param[4]: rotation (type: float) - Param[5]: color (type: Color) -Function 261: DrawPolyLines() (5 input parameters) - Name: DrawPolyLines - Return type: void - Description: Draw a polygon outline of n sides - Param[1]: center (type: Vector2) - Param[2]: sides (type: int) - Param[3]: radius (type: float) - Param[4]: rotation (type: float) - Param[5]: color (type: Color) -Function 262: DrawPolyLinesEx() (6 input parameters) - Name: DrawPolyLinesEx - Return type: void - Description: Draw a polygon outline of n sides with extended parameters - Param[1]: center (type: Vector2) - Param[2]: sides (type: int) - Param[3]: radius (type: float) - Param[4]: rotation (type: float) - Param[5]: lineThick (type: float) - Param[6]: color (type: Color) -Function 263: DrawSplineLinear() (4 input parameters) +Function 264: DrawSplineLinear() (4 input parameters) Name: DrawSplineLinear Return type: void Description: Draw spline: Linear, minimum 2 points @@ -2544,7 +2547,7 @@ Function 263: DrawSplineLinear() (4 input parameters) Param[2]: pointCount (type: int) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 264: DrawSplineBasis() (4 input parameters) +Function 265: DrawSplineBasis() (4 input parameters) Name: DrawSplineBasis Return type: void Description: Draw spline: B-Spline, minimum 4 points @@ -2552,7 +2555,7 @@ Function 264: DrawSplineBasis() (4 input parameters) Param[2]: pointCount (type: int) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 265: DrawSplineCatmullRom() (4 input parameters) +Function 266: DrawSplineCatmullRom() (4 input parameters) Name: DrawSplineCatmullRom Return type: void Description: Draw spline: Catmull-Rom, minimum 4 points @@ -2560,7 +2563,7 @@ Function 265: DrawSplineCatmullRom() (4 input parameters) Param[2]: pointCount (type: int) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 266: DrawSplineBezierQuadratic() (4 input parameters) +Function 267: DrawSplineBezierQuadratic() (4 input parameters) Name: DrawSplineBezierQuadratic Return type: void Description: Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...] @@ -2568,7 +2571,7 @@ Function 266: DrawSplineBezierQuadratic() (4 input parameters) Param[2]: pointCount (type: int) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 267: DrawSplineBezierCubic() (4 input parameters) +Function 268: DrawSplineBezierCubic() (4 input parameters) Name: DrawSplineBezierCubic Return type: void Description: Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...] @@ -2576,7 +2579,7 @@ Function 267: DrawSplineBezierCubic() (4 input parameters) Param[2]: pointCount (type: int) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 268: DrawSplineSegmentLinear() (4 input parameters) +Function 269: DrawSplineSegmentLinear() (4 input parameters) Name: DrawSplineSegmentLinear Return type: void Description: Draw spline segment: Linear, 2 points @@ -2584,7 +2587,7 @@ Function 268: DrawSplineSegmentLinear() (4 input parameters) Param[2]: p2 (type: Vector2) Param[3]: thick (type: float) Param[4]: color (type: Color) -Function 269: DrawSplineSegmentBasis() (6 input parameters) +Function 270: DrawSplineSegmentBasis() (6 input parameters) Name: DrawSplineSegmentBasis Return type: void Description: Draw spline segment: B-Spline, 4 points @@ -2594,7 +2597,7 @@ Function 269: DrawSplineSegmentBasis() (6 input parameters) Param[4]: p4 (type: Vector2) Param[5]: thick (type: float) Param[6]: color (type: Color) -Function 270: DrawSplineSegmentCatmullRom() (6 input parameters) +Function 271: DrawSplineSegmentCatmullRom() (6 input parameters) Name: DrawSplineSegmentCatmullRom Return type: void Description: Draw spline segment: Catmull-Rom, 4 points @@ -2604,7 +2607,7 @@ Function 270: DrawSplineSegmentCatmullRom() (6 input parameters) Param[4]: p4 (type: Vector2) Param[5]: thick (type: float) Param[6]: color (type: Color) -Function 271: DrawSplineSegmentBezierQuadratic() (5 input parameters) +Function 272: DrawSplineSegmentBezierQuadratic() (5 input parameters) Name: DrawSplineSegmentBezierQuadratic Return type: void Description: Draw spline segment: Quadratic Bezier, 2 points, 1 control point @@ -2613,7 +2616,7 @@ Function 271: DrawSplineSegmentBezierQuadratic() (5 input parameters) Param[3]: p3 (type: Vector2) Param[4]: thick (type: float) Param[5]: color (type: Color) -Function 272: DrawSplineSegmentBezierCubic() (6 input parameters) +Function 273: DrawSplineSegmentBezierCubic() (6 input parameters) Name: DrawSplineSegmentBezierCubic Return type: void Description: Draw spline segment: Cubic Bezier, 2 points, 2 control points @@ -2623,14 +2626,14 @@ Function 272: DrawSplineSegmentBezierCubic() (6 input parameters) Param[4]: p4 (type: Vector2) Param[5]: thick (type: float) Param[6]: color (type: Color) -Function 273: GetSplinePointLinear() (3 input parameters) +Function 274: GetSplinePointLinear() (3 input parameters) Name: GetSplinePointLinear Return type: Vector2 Description: Get (evaluate) spline point: Linear Param[1]: startPos (type: Vector2) Param[2]: endPos (type: Vector2) Param[3]: t (type: float) -Function 274: GetSplinePointBasis() (5 input parameters) +Function 275: GetSplinePointBasis() (5 input parameters) Name: GetSplinePointBasis Return type: Vector2 Description: Get (evaluate) spline point: B-Spline @@ -2639,7 +2642,7 @@ Function 274: GetSplinePointBasis() (5 input parameters) Param[3]: p3 (type: Vector2) Param[4]: p4 (type: Vector2) Param[5]: t (type: float) -Function 275: GetSplinePointCatmullRom() (5 input parameters) +Function 276: GetSplinePointCatmullRom() (5 input parameters) Name: GetSplinePointCatmullRom Return type: Vector2 Description: Get (evaluate) spline point: Catmull-Rom @@ -2648,7 +2651,7 @@ Function 275: GetSplinePointCatmullRom() (5 input parameters) Param[3]: p3 (type: Vector2) Param[4]: p4 (type: Vector2) Param[5]: t (type: float) -Function 276: GetSplinePointBezierQuadratic() (4 input parameters) +Function 277: GetSplinePointBezierQuadratic() (4 input parameters) Name: GetSplinePointBezierQuadratic Return type: Vector2 Description: Get (evaluate) spline point: Quadratic Bezier @@ -2656,7 +2659,7 @@ Function 276: GetSplinePointBezierQuadratic() (4 input parameters) Param[2]: c2 (type: Vector2) Param[3]: p3 (type: Vector2) Param[4]: t (type: float) -Function 277: GetSplinePointBezierCubic() (5 input parameters) +Function 278: GetSplinePointBezierCubic() (5 input parameters) Name: GetSplinePointBezierCubic Return type: Vector2 Description: Get (evaluate) spline point: Cubic Bezier @@ -2665,13 +2668,13 @@ Function 277: GetSplinePointBezierCubic() (5 input parameters) Param[3]: c3 (type: Vector2) Param[4]: p4 (type: Vector2) Param[5]: t (type: float) -Function 278: CheckCollisionRecs() (2 input parameters) +Function 279: CheckCollisionRecs() (2 input parameters) Name: CheckCollisionRecs Return type: bool Description: Check collision between two rectangles Param[1]: rec1 (type: Rectangle) Param[2]: rec2 (type: Rectangle) -Function 279: CheckCollisionCircles() (4 input parameters) +Function 280: CheckCollisionCircles() (4 input parameters) Name: CheckCollisionCircles Return type: bool Description: Check collision between two circles @@ -2679,14 +2682,14 @@ Function 279: CheckCollisionCircles() (4 input parameters) Param[2]: radius1 (type: float) Param[3]: center2 (type: Vector2) Param[4]: radius2 (type: float) -Function 280: CheckCollisionCircleRec() (3 input parameters) +Function 281: CheckCollisionCircleRec() (3 input parameters) Name: CheckCollisionCircleRec Return type: bool Description: Check collision between circle and rectangle Param[1]: center (type: Vector2) Param[2]: radius (type: float) Param[3]: rec (type: Rectangle) -Function 281: CheckCollisionCircleLine() (4 input parameters) +Function 282: CheckCollisionCircleLine() (4 input parameters) Name: CheckCollisionCircleLine Return type: bool Description: Check if circle collides with a line created between two points [p1] and [p2] @@ -2694,20 +2697,20 @@ Function 281: CheckCollisionCircleLine() (4 input parameters) Param[2]: radius (type: float) Param[3]: p1 (type: Vector2) Param[4]: p2 (type: Vector2) -Function 282: CheckCollisionPointRec() (2 input parameters) +Function 283: CheckCollisionPointRec() (2 input parameters) Name: CheckCollisionPointRec Return type: bool Description: Check if point is inside rectangle Param[1]: point (type: Vector2) Param[2]: rec (type: Rectangle) -Function 283: CheckCollisionPointCircle() (3 input parameters) +Function 284: CheckCollisionPointCircle() (3 input parameters) Name: CheckCollisionPointCircle Return type: bool Description: Check if point is inside circle Param[1]: point (type: Vector2) Param[2]: center (type: Vector2) Param[3]: radius (type: float) -Function 284: CheckCollisionPointTriangle() (4 input parameters) +Function 285: CheckCollisionPointTriangle() (4 input parameters) Name: CheckCollisionPointTriangle Return type: bool Description: Check if point is inside a triangle @@ -2715,7 +2718,7 @@ Function 284: CheckCollisionPointTriangle() (4 input parameters) Param[2]: p1 (type: Vector2) Param[3]: p2 (type: Vector2) Param[4]: p3 (type: Vector2) -Function 285: CheckCollisionPointLine() (4 input parameters) +Function 286: CheckCollisionPointLine() (4 input parameters) Name: CheckCollisionPointLine Return type: bool Description: Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] @@ -2723,14 +2726,14 @@ Function 285: CheckCollisionPointLine() (4 input parameters) Param[2]: p1 (type: Vector2) Param[3]: p2 (type: Vector2) Param[4]: threshold (type: int) -Function 286: CheckCollisionPointPoly() (3 input parameters) +Function 287: CheckCollisionPointPoly() (3 input parameters) Name: CheckCollisionPointPoly Return type: bool Description: Check if point is within a polygon described by array of vertices Param[1]: point (type: Vector2) Param[2]: points (type: const Vector2 *) Param[3]: pointCount (type: int) -Function 287: CheckCollisionLines() (5 input parameters) +Function 288: CheckCollisionLines() (5 input parameters) Name: CheckCollisionLines Return type: bool Description: Check the collision between two lines defined by two points each, returns collision point by reference @@ -2739,18 +2742,18 @@ Function 287: CheckCollisionLines() (5 input parameters) Param[3]: startPos2 (type: Vector2) Param[4]: endPos2 (type: Vector2) Param[5]: collisionPoint (type: Vector2 *) -Function 288: GetCollisionRec() (2 input parameters) +Function 289: GetCollisionRec() (2 input parameters) Name: GetCollisionRec Return type: Rectangle Description: Get collision rectangle for two rectangles collision Param[1]: rec1 (type: Rectangle) Param[2]: rec2 (type: Rectangle) -Function 289: LoadImage() (1 input parameters) +Function 290: LoadImage() (1 input parameters) Name: LoadImage Return type: Image Description: Load image from file into CPU memory (RAM) Param[1]: fileName (type: const char *) -Function 290: LoadImageRaw() (5 input parameters) +Function 291: LoadImageRaw() (5 input parameters) Name: LoadImageRaw Return type: Image Description: Load image from RAW file data @@ -2759,13 +2762,13 @@ Function 290: LoadImageRaw() (5 input parameters) Param[3]: height (type: int) Param[4]: format (type: int) Param[5]: headerSize (type: int) -Function 291: LoadImageAnim() (2 input parameters) +Function 292: LoadImageAnim() (2 input parameters) Name: LoadImageAnim Return type: Image Description: Load image sequence from file (frames appended to image.data) Param[1]: fileName (type: const char *) Param[2]: frames (type: int *) -Function 292: LoadImageAnimFromMemory() (4 input parameters) +Function 293: LoadImageAnimFromMemory() (4 input parameters) Name: LoadImageAnimFromMemory Return type: Image Description: Load image sequence from memory buffer @@ -2773,60 +2776,60 @@ Function 292: LoadImageAnimFromMemory() (4 input parameters) Param[2]: fileData (type: const unsigned char *) Param[3]: dataSize (type: int) Param[4]: frames (type: int *) -Function 293: LoadImageFromMemory() (3 input parameters) +Function 294: LoadImageFromMemory() (3 input parameters) Name: LoadImageFromMemory Return type: Image Description: Load image from memory buffer, fileType refers to extension: i.e. '.png' Param[1]: fileType (type: const char *) Param[2]: fileData (type: const unsigned char *) Param[3]: dataSize (type: int) -Function 294: LoadImageFromTexture() (1 input parameters) +Function 295: LoadImageFromTexture() (1 input parameters) Name: LoadImageFromTexture Return type: Image Description: Load image from GPU texture data Param[1]: texture (type: Texture2D) -Function 295: LoadImageFromScreen() (0 input parameters) +Function 296: LoadImageFromScreen() (0 input parameters) Name: LoadImageFromScreen Return type: Image Description: Load image from screen buffer (screenshot) No input parameters -Function 296: IsImageValid() (1 input parameters) +Function 297: IsImageValid() (1 input parameters) Name: IsImageValid Return type: bool Description: Check if an image is valid (data and parameters) Param[1]: image (type: Image) -Function 297: UnloadImage() (1 input parameters) +Function 298: UnloadImage() (1 input parameters) Name: UnloadImage Return type: void Description: Unload image from CPU memory (RAM) Param[1]: image (type: Image) -Function 298: ExportImage() (2 input parameters) +Function 299: ExportImage() (2 input parameters) Name: ExportImage Return type: bool Description: Export image data to file, returns true on success Param[1]: image (type: Image) Param[2]: fileName (type: const char *) -Function 299: ExportImageToMemory() (3 input parameters) +Function 300: ExportImageToMemory() (3 input parameters) Name: ExportImageToMemory Return type: unsigned char * Description: Export image to memory buffer, memory must be MemFree() Param[1]: image (type: Image) Param[2]: fileType (type: const char *) Param[3]: fileSize (type: int *) -Function 300: ExportImageAsCode() (2 input parameters) +Function 301: ExportImageAsCode() (2 input parameters) Name: ExportImageAsCode Return type: bool Description: Export image as code file defining an array of bytes, returns true on success Param[1]: image (type: Image) Param[2]: fileName (type: const char *) -Function 301: GenImageColor() (3 input parameters) +Function 302: GenImageColor() (3 input parameters) Name: GenImageColor Return type: Image Description: Generate image: plain color Param[1]: width (type: int) Param[2]: height (type: int) Param[3]: color (type: Color) -Function 302: GenImageGradientLinear() (5 input parameters) +Function 303: GenImageGradientLinear() (5 input parameters) Name: GenImageGradientLinear Return type: Image Description: Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient @@ -2835,7 +2838,7 @@ Function 302: GenImageGradientLinear() (5 input parameters) Param[3]: direction (type: int) Param[4]: start (type: Color) Param[5]: end (type: Color) -Function 303: GenImageGradientRadial() (5 input parameters) +Function 304: GenImageGradientRadial() (5 input parameters) Name: GenImageGradientRadial Return type: Image Description: Generate image: radial gradient @@ -2844,7 +2847,7 @@ Function 303: GenImageGradientRadial() (5 input parameters) Param[3]: density (type: float) Param[4]: inner (type: Color) Param[5]: outer (type: Color) -Function 304: GenImageGradientSquare() (5 input parameters) +Function 305: GenImageGradientSquare() (5 input parameters) Name: GenImageGradientSquare Return type: Image Description: Generate image: square gradient @@ -2853,7 +2856,7 @@ Function 304: GenImageGradientSquare() (5 input parameters) Param[3]: density (type: float) Param[4]: inner (type: Color) Param[5]: outer (type: Color) -Function 305: GenImageChecked() (6 input parameters) +Function 306: GenImageChecked() (6 input parameters) Name: GenImageChecked Return type: Image Description: Generate image: checked @@ -2863,14 +2866,14 @@ Function 305: GenImageChecked() (6 input parameters) Param[4]: checksY (type: int) Param[5]: col1 (type: Color) Param[6]: col2 (type: Color) -Function 306: GenImageWhiteNoise() (3 input parameters) +Function 307: GenImageWhiteNoise() (3 input parameters) Name: GenImageWhiteNoise Return type: Image Description: Generate image: white noise Param[1]: width (type: int) Param[2]: height (type: int) Param[3]: factor (type: float) -Function 307: GenImagePerlinNoise() (5 input parameters) +Function 308: GenImagePerlinNoise() (5 input parameters) Name: GenImagePerlinNoise Return type: Image Description: Generate image: perlin noise @@ -2879,45 +2882,45 @@ Function 307: GenImagePerlinNoise() (5 input parameters) Param[3]: offsetX (type: int) Param[4]: offsetY (type: int) Param[5]: scale (type: float) -Function 308: GenImageCellular() (3 input parameters) +Function 309: GenImageCellular() (3 input parameters) Name: GenImageCellular Return type: Image Description: Generate image: cellular algorithm, bigger tileSize means bigger cells Param[1]: width (type: int) Param[2]: height (type: int) Param[3]: tileSize (type: int) -Function 309: GenImageText() (3 input parameters) +Function 310: GenImageText() (3 input parameters) Name: GenImageText Return type: Image Description: Generate image: grayscale image from text data Param[1]: width (type: int) Param[2]: height (type: int) Param[3]: text (type: const char *) -Function 310: ImageCopy() (1 input parameters) +Function 311: ImageCopy() (1 input parameters) Name: ImageCopy Return type: Image Description: Create an image duplicate (useful for transformations) Param[1]: image (type: Image) -Function 311: ImageFromImage() (2 input parameters) +Function 312: ImageFromImage() (2 input parameters) Name: ImageFromImage Return type: Image Description: Create an image from another image piece Param[1]: image (type: Image) Param[2]: rec (type: Rectangle) -Function 312: ImageFromChannel() (2 input parameters) +Function 313: ImageFromChannel() (2 input parameters) Name: ImageFromChannel Return type: Image Description: Create an image from a selected channel of another image (GRAYSCALE) Param[1]: image (type: Image) Param[2]: selectedChannel (type: int) -Function 313: ImageText() (3 input parameters) +Function 314: ImageText() (3 input parameters) Name: ImageText Return type: Image Description: Create an image from text (default font) Param[1]: text (type: const char *) Param[2]: fontSize (type: int) Param[3]: color (type: Color) -Function 314: ImageTextEx() (5 input parameters) +Function 315: ImageTextEx() (5 input parameters) Name: ImageTextEx Return type: Image Description: Create an image from text (custom sprite font) @@ -2926,76 +2929,76 @@ Function 314: ImageTextEx() (5 input parameters) Param[3]: fontSize (type: float) Param[4]: spacing (type: float) Param[5]: tint (type: Color) -Function 315: ImageFormat() (2 input parameters) +Function 316: ImageFormat() (2 input parameters) Name: ImageFormat Return type: void Description: Convert image data to desired format Param[1]: image (type: Image *) Param[2]: newFormat (type: int) -Function 316: ImageToPOT() (2 input parameters) +Function 317: ImageToPOT() (2 input parameters) Name: ImageToPOT Return type: void Description: Convert image to POT (power-of-two) Param[1]: image (type: Image *) Param[2]: fill (type: Color) -Function 317: ImageCrop() (2 input parameters) +Function 318: ImageCrop() (2 input parameters) Name: ImageCrop Return type: void Description: Crop an image to a defined rectangle Param[1]: image (type: Image *) Param[2]: crop (type: Rectangle) -Function 318: ImageAlphaCrop() (2 input parameters) +Function 319: ImageAlphaCrop() (2 input parameters) Name: ImageAlphaCrop Return type: void Description: Crop image depending on alpha value Param[1]: image (type: Image *) Param[2]: threshold (type: float) -Function 319: ImageAlphaClear() (3 input parameters) +Function 320: ImageAlphaClear() (3 input parameters) Name: ImageAlphaClear Return type: void Description: Clear alpha channel to desired color Param[1]: image (type: Image *) Param[2]: color (type: Color) Param[3]: threshold (type: float) -Function 320: ImageAlphaMask() (2 input parameters) +Function 321: ImageAlphaMask() (2 input parameters) Name: ImageAlphaMask Return type: void Description: Apply alpha mask to image Param[1]: image (type: Image *) Param[2]: alphaMask (type: Image) -Function 321: ImageAlphaPremultiply() (1 input parameters) +Function 322: ImageAlphaPremultiply() (1 input parameters) Name: ImageAlphaPremultiply Return type: void Description: Premultiply alpha channel Param[1]: image (type: Image *) -Function 322: ImageBlurGaussian() (2 input parameters) +Function 323: ImageBlurGaussian() (2 input parameters) Name: ImageBlurGaussian Return type: void Description: Apply Gaussian blur using a box blur approximation Param[1]: image (type: Image *) Param[2]: blurSize (type: int) -Function 323: ImageKernelConvolution() (3 input parameters) +Function 324: ImageKernelConvolution() (3 input parameters) Name: ImageKernelConvolution Return type: void Description: Apply custom square convolution kernel to image Param[1]: image (type: Image *) Param[2]: kernel (type: const float *) Param[3]: kernelSize (type: int) -Function 324: ImageResize() (3 input parameters) +Function 325: ImageResize() (3 input parameters) Name: ImageResize Return type: void Description: Resize image (Bicubic scaling algorithm) Param[1]: image (type: Image *) Param[2]: newWidth (type: int) Param[3]: newHeight (type: int) -Function 325: ImageResizeNN() (3 input parameters) +Function 326: ImageResizeNN() (3 input parameters) Name: ImageResizeNN Return type: void Description: Resize image (Nearest-Neighbor scaling algorithm) Param[1]: image (type: Image *) Param[2]: newWidth (type: int) Param[3]: newHeight (type: int) -Function 326: ImageResizeCanvas() (6 input parameters) +Function 327: ImageResizeCanvas() (6 input parameters) Name: ImageResizeCanvas Return type: void Description: Resize canvas and fill with color @@ -3005,12 +3008,12 @@ Function 326: ImageResizeCanvas() (6 input parameters) Param[4]: offsetX (type: int) Param[5]: offsetY (type: int) Param[6]: fill (type: Color) -Function 327: ImageMipmaps() (1 input parameters) +Function 328: ImageMipmaps() (1 input parameters) Name: ImageMipmaps Return type: void Description: Compute all mipmap levels for a provided image Param[1]: image (type: Image *) -Function 328: ImageDither() (5 input parameters) +Function 329: ImageDither() (5 input parameters) Name: ImageDither Return type: void Description: Dither image data to 16bpp or lower (Floyd-Steinberg dithering) @@ -3019,109 +3022,109 @@ Function 328: ImageDither() (5 input parameters) Param[3]: gBpp (type: int) Param[4]: bBpp (type: int) Param[5]: aBpp (type: int) -Function 329: ImageFlipVertical() (1 input parameters) +Function 330: ImageFlipVertical() (1 input parameters) Name: ImageFlipVertical Return type: void Description: Flip image vertically Param[1]: image (type: Image *) -Function 330: ImageFlipHorizontal() (1 input parameters) +Function 331: ImageFlipHorizontal() (1 input parameters) Name: ImageFlipHorizontal Return type: void Description: Flip image horizontally Param[1]: image (type: Image *) -Function 331: ImageRotate() (2 input parameters) +Function 332: ImageRotate() (2 input parameters) Name: ImageRotate Return type: void Description: Rotate image by input angle in degrees (-359 to 359) Param[1]: image (type: Image *) Param[2]: degrees (type: int) -Function 332: ImageRotateCW() (1 input parameters) +Function 333: ImageRotateCW() (1 input parameters) Name: ImageRotateCW Return type: void Description: Rotate image clockwise 90deg Param[1]: image (type: Image *) -Function 333: ImageRotateCCW() (1 input parameters) +Function 334: ImageRotateCCW() (1 input parameters) Name: ImageRotateCCW Return type: void Description: Rotate image counter-clockwise 90deg Param[1]: image (type: Image *) -Function 334: ImageColorTint() (2 input parameters) +Function 335: ImageColorTint() (2 input parameters) Name: ImageColorTint Return type: void Description: Modify image color: tint Param[1]: image (type: Image *) Param[2]: color (type: Color) -Function 335: ImageColorInvert() (1 input parameters) +Function 336: ImageColorInvert() (1 input parameters) Name: ImageColorInvert Return type: void Description: Modify image color: invert Param[1]: image (type: Image *) -Function 336: ImageColorGrayscale() (1 input parameters) +Function 337: ImageColorGrayscale() (1 input parameters) Name: ImageColorGrayscale Return type: void Description: Modify image color: grayscale Param[1]: image (type: Image *) -Function 337: ImageColorContrast() (2 input parameters) +Function 338: ImageColorContrast() (2 input parameters) Name: ImageColorContrast Return type: void Description: Modify image color: contrast (-100 to 100) Param[1]: image (type: Image *) Param[2]: contrast (type: int) -Function 338: ImageColorBrightness() (2 input parameters) +Function 339: ImageColorBrightness() (2 input parameters) Name: ImageColorBrightness Return type: void Description: Modify image color: brightness (-255 to 255) Param[1]: image (type: Image *) Param[2]: brightness (type: int) -Function 339: ImageColorReplace() (3 input parameters) +Function 340: ImageColorReplace() (3 input parameters) Name: ImageColorReplace Return type: void Description: Modify image color: replace color Param[1]: image (type: Image *) Param[2]: color (type: Color) Param[3]: replace (type: Color) -Function 340: LoadImageColors() (1 input parameters) +Function 341: LoadImageColors() (1 input parameters) Name: LoadImageColors Return type: Color * Description: Load color data from image as a Color array (RGBA - 32bit) Param[1]: image (type: Image) -Function 341: LoadImagePalette() (3 input parameters) +Function 342: LoadImagePalette() (3 input parameters) Name: LoadImagePalette Return type: Color * Description: Load colors palette from image as a Color array (RGBA - 32bit) Param[1]: image (type: Image) Param[2]: maxPaletteSize (type: int) Param[3]: colorCount (type: int *) -Function 342: UnloadImageColors() (1 input parameters) +Function 343: UnloadImageColors() (1 input parameters) Name: UnloadImageColors Return type: void Description: Unload color data loaded with LoadImageColors() Param[1]: colors (type: Color *) -Function 343: UnloadImagePalette() (1 input parameters) +Function 344: UnloadImagePalette() (1 input parameters) Name: UnloadImagePalette Return type: void Description: Unload colors palette loaded with LoadImagePalette() Param[1]: colors (type: Color *) -Function 344: GetImageAlphaBorder() (2 input parameters) +Function 345: GetImageAlphaBorder() (2 input parameters) Name: GetImageAlphaBorder Return type: Rectangle Description: Get image alpha border rectangle Param[1]: image (type: Image) Param[2]: threshold (type: float) -Function 345: GetImageColor() (3 input parameters) +Function 346: GetImageColor() (3 input parameters) Name: GetImageColor Return type: Color Description: Get image pixel color at (x, y) position Param[1]: image (type: Image) Param[2]: x (type: int) Param[3]: y (type: int) -Function 346: ImageClearBackground() (2 input parameters) +Function 347: ImageClearBackground() (2 input parameters) Name: ImageClearBackground Return type: void Description: Clear image background with given color Param[1]: dst (type: Image *) Param[2]: color (type: Color) -Function 347: ImageDrawPixel() (4 input parameters) +Function 348: ImageDrawPixel() (4 input parameters) Name: ImageDrawPixel Return type: void Description: Draw pixel within an image @@ -3129,14 +3132,14 @@ Function 347: ImageDrawPixel() (4 input parameters) Param[2]: posX (type: int) Param[3]: posY (type: int) Param[4]: color (type: Color) -Function 348: ImageDrawPixelV() (3 input parameters) +Function 349: ImageDrawPixelV() (3 input parameters) Name: ImageDrawPixelV Return type: void Description: Draw pixel within an image (Vector version) Param[1]: dst (type: Image *) Param[2]: position (type: Vector2) Param[3]: color (type: Color) -Function 349: ImageDrawLine() (6 input parameters) +Function 350: ImageDrawLine() (6 input parameters) Name: ImageDrawLine Return type: void Description: Draw line within an image @@ -3146,7 +3149,7 @@ Function 349: ImageDrawLine() (6 input parameters) Param[4]: endPosX (type: int) Param[5]: endPosY (type: int) Param[6]: color (type: Color) -Function 350: ImageDrawLineV() (4 input parameters) +Function 351: ImageDrawLineV() (4 input parameters) Name: ImageDrawLineV Return type: void Description: Draw line within an image (Vector version) @@ -3154,7 +3157,7 @@ Function 350: ImageDrawLineV() (4 input parameters) Param[2]: start (type: Vector2) Param[3]: end (type: Vector2) Param[4]: color (type: Color) -Function 351: ImageDrawLineEx() (5 input parameters) +Function 352: ImageDrawLineEx() (5 input parameters) Name: ImageDrawLineEx Return type: void Description: Draw a line defining thickness within an image @@ -3163,84 +3166,15 @@ Function 351: ImageDrawLineEx() (5 input parameters) Param[3]: end (type: Vector2) Param[4]: thick (type: int) Param[5]: color (type: Color) -Function 352: ImageDrawCircle() (5 input parameters) - Name: ImageDrawCircle +Function 353: ImageDrawLineStrip() (4 input parameters) + Name: ImageDrawLineStrip Return type: void - Description: Draw a filled circle within an image + Description: Draw a lines sequence within an image Param[1]: dst (type: Image *) - Param[2]: centerX (type: int) - Param[3]: centerY (type: int) - Param[4]: radius (type: int) - Param[5]: color (type: Color) -Function 353: ImageDrawCircleV() (4 input parameters) - Name: ImageDrawCircleV - Return type: void - Description: Draw a filled circle within an image (Vector version) - Param[1]: dst (type: Image *) - Param[2]: center (type: Vector2) - Param[3]: radius (type: int) + Param[2]: points (type: const Vector2 *) + Param[3]: pointCount (type: int) Param[4]: color (type: Color) -Function 354: ImageDrawCircleLines() (5 input parameters) - Name: ImageDrawCircleLines - Return type: void - Description: Draw circle outline within an image - Param[1]: dst (type: Image *) - Param[2]: centerX (type: int) - Param[3]: centerY (type: int) - Param[4]: radius (type: int) - Param[5]: color (type: Color) -Function 355: ImageDrawCircleLinesV() (4 input parameters) - Name: ImageDrawCircleLinesV - Return type: void - Description: Draw circle outline within an image (Vector version) - Param[1]: dst (type: Image *) - Param[2]: center (type: Vector2) - Param[3]: radius (type: int) - Param[4]: color (type: Color) -Function 356: ImageDrawRectangle() (6 input parameters) - Name: ImageDrawRectangle - Return type: void - Description: Draw rectangle within an image - Param[1]: dst (type: Image *) - Param[2]: posX (type: int) - Param[3]: posY (type: int) - Param[4]: width (type: int) - Param[5]: height (type: int) - Param[6]: color (type: Color) -Function 357: ImageDrawRectangleV() (4 input parameters) - Name: ImageDrawRectangleV - Return type: void - Description: Draw rectangle within an image (Vector version) - Param[1]: dst (type: Image *) - Param[2]: position (type: Vector2) - Param[3]: size (type: Vector2) - Param[4]: color (type: Color) -Function 358: ImageDrawRectangleRec() (3 input parameters) - Name: ImageDrawRectangleRec - Return type: void - Description: Draw rectangle within an image - Param[1]: dst (type: Image *) - Param[2]: rec (type: Rectangle) - Param[3]: color (type: Color) -Function 359: ImageDrawRectangleLines() (6 input parameters) - Name: ImageDrawRectangleLines - Return type: void - Description: Draw rectangle lines within an image - Param[1]: dst (type: Image *) - Param[2]: posX (type: int) - Param[3]: posY (type: int) - Param[4]: width (type: int) - Param[5]: height (type: int) - Param[6]: color (type: Color) -Function 360: ImageDrawRectangleLinesEx() (4 input parameters) - Name: ImageDrawRectangleLinesEx - Return type: void - Description: Draw rectangle lines within an image with extended parameters - Param[1]: dst (type: Image *) - Param[2]: rec (type: Rectangle) - Param[3]: thick (type: int) - Param[4]: color (type: Color) -Function 361: ImageDrawTriangle() (5 input parameters) +Function 354: ImageDrawTriangle() (5 input parameters) Name: ImageDrawTriangle Return type: void Description: Draw triangle within an image @@ -3249,7 +3183,7 @@ Function 361: ImageDrawTriangle() (5 input parameters) Param[3]: v2 (type: Vector2) Param[4]: v3 (type: Vector2) Param[5]: color (type: Color) -Function 362: ImageDrawTriangleGradient() (7 input parameters) +Function 355: ImageDrawTriangleGradient() (7 input parameters) Name: ImageDrawTriangleGradient Return type: void Description: Draw triangle with interpolated colors within an image @@ -3260,7 +3194,7 @@ Function 362: ImageDrawTriangleGradient() (7 input parameters) Param[5]: c1 (type: Color) Param[6]: c2 (type: Color) Param[7]: c3 (type: Color) -Function 363: ImageDrawTriangleLines() (5 input parameters) +Function 356: ImageDrawTriangleLines() (5 input parameters) Name: ImageDrawTriangleLines Return type: void Description: Draw triangle outline within an image @@ -3269,7 +3203,7 @@ Function 363: ImageDrawTriangleLines() (5 input parameters) Param[3]: v2 (type: Vector2) Param[4]: v3 (type: Vector2) Param[5]: color (type: Color) -Function 364: ImageDrawTriangleFan() (4 input parameters) +Function 357: ImageDrawTriangleFan() (4 input parameters) Name: ImageDrawTriangleFan Return type: void Description: Draw a triangle fan defined by points within an image (first vertex is the center) @@ -3277,7 +3211,7 @@ Function 364: ImageDrawTriangleFan() (4 input parameters) Param[2]: points (type: const Vector2 *) Param[3]: pointCount (type: int) Param[4]: color (type: Color) -Function 365: ImageDrawTriangleStrip() (4 input parameters) +Function 358: ImageDrawTriangleStrip() (4 input parameters) Name: ImageDrawTriangleStrip Return type: void Description: Draw a triangle strip defined by points within an image @@ -3285,16 +3219,122 @@ Function 365: ImageDrawTriangleStrip() (4 input parameters) Param[2]: points (type: const Vector2 *) Param[3]: pointCount (type: int) Param[4]: color (type: Color) -Function 366: ImageDraw() (5 input parameters) - Name: ImageDraw +Function 359: ImageDrawRectangle() (6 input parameters) + Name: ImageDrawRectangle Return type: void - Description: Draw a source image within a destination image (tint applied to source) + Description: Draw rectangle within an image + Param[1]: dst (type: Image *) + Param[2]: posX (type: int) + Param[3]: posY (type: int) + Param[4]: width (type: int) + Param[5]: height (type: int) + Param[6]: color (type: Color) +Function 360: ImageDrawRectangleV() (4 input parameters) + Name: ImageDrawRectangleV + Return type: void + Description: Draw rectangle within an image (Vector version) + Param[1]: dst (type: Image *) + Param[2]: position (type: Vector2) + Param[3]: size (type: Vector2) + Param[4]: color (type: Color) +Function 361: ImageDrawRectangleRec() (3 input parameters) + Name: ImageDrawRectangleRec + Return type: void + Description: Draw rectangle within an image + Param[1]: dst (type: Image *) + Param[2]: rec (type: Rectangle) + Param[3]: color (type: Color) +Function 362: ImageDrawRectangleLines() (6 input parameters) + Name: ImageDrawRectangleLines + Return type: void + Description: Draw rectangle lines within an image + Param[1]: dst (type: Image *) + Param[2]: posX (type: int) + Param[3]: posY (type: int) + Param[4]: width (type: int) + Param[5]: height (type: int) + Param[6]: color (type: Color) +Function 363: ImageDrawRectangleLinesEx() (4 input parameters) + Name: ImageDrawRectangleLinesEx + Return type: void + Description: Draw rectangle lines within an image with line thickness + Param[1]: dst (type: Image *) + Param[2]: rec (type: Rectangle) + Param[3]: thick (type: int) + Param[4]: color (type: Color) +Function 364: ImageDrawCircle() (5 input parameters) + Name: ImageDrawCircle + Return type: void + Description: Draw a filled circle within an image + Param[1]: dst (type: Image *) + Param[2]: centerX (type: int) + Param[3]: centerY (type: int) + Param[4]: radius (type: int) + Param[5]: color (type: Color) +Function 365: ImageDrawCircleV() (4 input parameters) + Name: ImageDrawCircleV + Return type: void + Description: Draw a filled circle within an image (Vector version) + Param[1]: dst (type: Image *) + Param[2]: center (type: Vector2) + Param[3]: radius (type: int) + Param[4]: color (type: Color) +Function 366: ImageDrawCircleLines() (5 input parameters) + Name: ImageDrawCircleLines + Return type: void + Description: Draw circle outline within an image + Param[1]: dst (type: Image *) + Param[2]: centerX (type: int) + Param[3]: centerY (type: int) + Param[4]: radius (type: int) + Param[5]: color (type: Color) +Function 367: ImageDrawCircleLinesV() (4 input parameters) + Name: ImageDrawCircleLinesV + Return type: void + Description: Draw circle outline within an image (Vector version) + Param[1]: dst (type: Image *) + Param[2]: center (type: Vector2) + Param[3]: radius (type: int) + Param[4]: color (type: Color) +Function 368: ImageDrawCircleGradient() (5 input parameters) + Name: ImageDrawCircleGradient + Return type: void + Description: Draw a gradient-filled circle within an image + Param[1]: dst (type: Image *) + Param[2]: center (type: Vector2) + Param[3]: radius (type: float) + Param[4]: inner (type: Color) + Param[5]: outer (type: Color) +Function 369: ImageDrawImage() (5 input parameters) + Name: ImageDrawImage + Return type: void + Description: Draw an image within an image + Param[1]: dst (type: Image *) + Param[2]: src (type: Image) + Param[3]: posX (type: int) + Param[4]: posY (type: int) + Param[5]: tint (type: Color) +Function 370: ImageDrawImageRec() (5 input parameters) + Name: ImageDrawImageRec + Return type: void + Description: Draw a part of an image defined by a rectangle within an image + Param[1]: dst (type: Image *) + Param[2]: src (type: Image) + Param[3]: srcRec (type: Rectangle) + Param[4]: position (type: Vector2) + Param[5]: tint (type: Color) +Function 371: ImageDrawImagePro() (7 input parameters) + Name: ImageDrawImagePro + Return type: void + Description: Draw a part of an image defined by a rectangle into destination rectangle, with scaling and rotation, within an image Param[1]: dst (type: Image *) Param[2]: src (type: Image) Param[3]: srcRec (type: Rectangle) Param[4]: dstRec (type: Rectangle) - Param[5]: tint (type: Color) -Function 367: ImageDrawText() (6 input parameters) + Param[5]: origin (type: Vector2) + Param[6]: rotation (type: float) + Param[7]: tint (type: Color) +Function 372: ImageDrawText() (6 input parameters) Name: ImageDrawText Return type: void Description: Draw text (using default font) within an image (destination) @@ -3304,7 +3344,7 @@ Function 367: ImageDrawText() (6 input parameters) Param[4]: posY (type: int) Param[5]: fontSize (type: int) Param[6]: color (type: Color) -Function 368: ImageDrawTextEx() (7 input parameters) +Function 373: ImageDrawTextEx() (7 input parameters) Name: ImageDrawTextEx Return type: void Description: Draw text (custom sprite font) within an image (destination) @@ -3315,79 +3355,79 @@ Function 368: ImageDrawTextEx() (7 input parameters) Param[5]: fontSize (type: float) Param[6]: spacing (type: float) Param[7]: tint (type: Color) -Function 369: LoadTexture() (1 input parameters) +Function 374: LoadTexture() (1 input parameters) Name: LoadTexture Return type: Texture2D Description: Load texture from file into GPU memory (VRAM) Param[1]: fileName (type: const char *) -Function 370: LoadTextureFromImage() (1 input parameters) +Function 375: LoadTextureFromImage() (1 input parameters) Name: LoadTextureFromImage Return type: Texture2D Description: Load texture from image data Param[1]: image (type: Image) -Function 371: LoadTextureCubemap() (2 input parameters) +Function 376: LoadTextureCubemap() (2 input parameters) Name: LoadTextureCubemap Return type: TextureCubemap Description: Load cubemap from image, multiple image cubemap layouts supported Param[1]: image (type: Image) Param[2]: layout (type: int) -Function 372: LoadRenderTexture() (2 input parameters) +Function 377: LoadRenderTexture() (2 input parameters) Name: LoadRenderTexture Return type: RenderTexture2D Description: Load texture for rendering (framebuffer) Param[1]: width (type: int) Param[2]: height (type: int) -Function 373: IsTextureValid() (1 input parameters) +Function 378: IsTextureValid() (1 input parameters) Name: IsTextureValid Return type: bool Description: Check if texture is valid (loaded in GPU) Param[1]: texture (type: Texture2D) -Function 374: UnloadTexture() (1 input parameters) +Function 379: UnloadTexture() (1 input parameters) Name: UnloadTexture Return type: void Description: Unload texture from GPU memory (VRAM) Param[1]: texture (type: Texture2D) -Function 375: IsRenderTextureValid() (1 input parameters) +Function 380: IsRenderTextureValid() (1 input parameters) Name: IsRenderTextureValid Return type: bool Description: Check if render texture is valid (loaded in GPU) Param[1]: target (type: RenderTexture2D) -Function 376: UnloadRenderTexture() (1 input parameters) +Function 381: UnloadRenderTexture() (1 input parameters) Name: UnloadRenderTexture Return type: void Description: Unload render texture from GPU memory (VRAM) Param[1]: target (type: RenderTexture2D) -Function 377: UpdateTexture() (2 input parameters) +Function 382: UpdateTexture() (2 input parameters) Name: UpdateTexture Return type: void Description: Update GPU texture with new data (pixels should be able to fill texture) Param[1]: texture (type: Texture2D) Param[2]: pixels (type: const void *) -Function 378: UpdateTextureRec() (3 input parameters) +Function 383: UpdateTextureRec() (3 input parameters) Name: UpdateTextureRec Return type: void Description: Update GPU texture rectangle with new data (pixels and rec should fit in texture) Param[1]: texture (type: Texture2D) Param[2]: rec (type: Rectangle) Param[3]: pixels (type: const void *) -Function 379: GenTextureMipmaps() (1 input parameters) +Function 384: GenTextureMipmaps() (1 input parameters) Name: GenTextureMipmaps Return type: void Description: Generate GPU mipmaps for a texture Param[1]: texture (type: Texture2D *) -Function 380: SetTextureFilter() (2 input parameters) +Function 385: SetTextureFilter() (2 input parameters) Name: SetTextureFilter Return type: void Description: Set texture scaling filter mode Param[1]: texture (type: Texture2D) Param[2]: filter (type: int) -Function 381: SetTextureWrap() (2 input parameters) +Function 386: SetTextureWrap() (2 input parameters) Name: SetTextureWrap Return type: void Description: Set texture wrapping mode Param[1]: texture (type: Texture2D) Param[2]: wrap (type: int) -Function 382: DrawTexture() (4 input parameters) +Function 387: DrawTexture() (4 input parameters) Name: DrawTexture Return type: void Description: Draw a Texture2D @@ -3395,23 +3435,23 @@ Function 382: DrawTexture() (4 input parameters) Param[2]: posX (type: int) Param[3]: posY (type: int) Param[4]: tint (type: Color) -Function 383: DrawTextureV() (3 input parameters) +Function 388: DrawTextureV() (3 input parameters) Name: DrawTextureV Return type: void Description: Draw a Texture2D with position defined as Vector2 Param[1]: texture (type: Texture2D) Param[2]: position (type: Vector2) Param[3]: tint (type: Color) -Function 384: DrawTextureEx() (5 input parameters) +Function 389: DrawTextureEx() (5 input parameters) Name: DrawTextureEx Return type: void - Description: Draw a Texture2D with extended parameters + Description: Draw a Texture2D with rotation and scale Param[1]: texture (type: Texture2D) Param[2]: position (type: Vector2) Param[3]: rotation (type: float) Param[4]: scale (type: float) Param[5]: tint (type: Color) -Function 385: DrawTextureRec() (4 input parameters) +Function 390: DrawTextureRec() (4 input parameters) Name: DrawTextureRec Return type: void Description: Draw a part of a texture defined by a rectangle @@ -3419,7 +3459,7 @@ Function 385: DrawTextureRec() (4 input parameters) Param[2]: rec (type: Rectangle) Param[3]: position (type: Vector2) Param[4]: tint (type: Color) -Function 386: DrawTexturePro() (6 input parameters) +Function 391: DrawTexturePro() (6 input parameters) Name: DrawTexturePro Return type: void Description: Draw a part of a texture defined by a source rectangle to destination rectangle, with scaling and rotation @@ -3429,7 +3469,7 @@ Function 386: DrawTexturePro() (6 input parameters) Param[4]: origin (type: Vector2) Param[5]: rotation (type: float) Param[6]: tint (type: Color) -Function 387: DrawTextureNPatch() (6 input parameters) +Function 392: DrawTextureNPatch() (6 input parameters) Name: DrawTextureNPatch Return type: void Description: Draw a texture (or part of it) that stretches or shrinks nicely @@ -3439,134 +3479,134 @@ Function 387: DrawTextureNPatch() (6 input parameters) Param[4]: origin (type: Vector2) Param[5]: rotation (type: float) Param[6]: tint (type: Color) -Function 388: ColorIsEqual() (2 input parameters) +Function 393: ColorIsEqual() (2 input parameters) Name: ColorIsEqual Return type: bool Description: Check if two colors are equal Param[1]: col1 (type: Color) Param[2]: col2 (type: Color) -Function 389: Fade() (2 input parameters) +Function 394: Fade() (2 input parameters) Name: Fade Return type: Color Description: Get color with alpha applied, alpha goes from 0.0f to 1.0f Param[1]: color (type: Color) Param[2]: alpha (type: float) -Function 390: ColorToInt() (1 input parameters) +Function 395: ColorToInt() (1 input parameters) Name: ColorToInt Return type: int Description: Get hexadecimal value for a Color (0xRRGGBBAA) Param[1]: color (type: Color) -Function 391: ColorNormalize() (1 input parameters) +Function 396: ColorNormalize() (1 input parameters) Name: ColorNormalize Return type: Vector4 Description: Get Color normalized as float [0..1] Param[1]: color (type: Color) -Function 392: ColorFromNormalized() (1 input parameters) +Function 397: ColorFromNormalized() (1 input parameters) Name: ColorFromNormalized Return type: Color Description: Get Color from normalized values [0..1] Param[1]: normalized (type: Vector4) -Function 393: ColorToHSV() (1 input parameters) +Function 398: ColorToHSV() (1 input parameters) Name: ColorToHSV Return type: Vector3 Description: Get HSV values for a Color, hue [0..360], saturation/value [0..1] Param[1]: color (type: Color) -Function 394: ColorFromHSV() (3 input parameters) +Function 399: ColorFromHSV() (3 input parameters) Name: ColorFromHSV Return type: Color Description: Get a Color from HSV values, hue [0..360], saturation/value [0..1] Param[1]: hue (type: float) Param[2]: saturation (type: float) Param[3]: value (type: float) -Function 395: ColorTint() (2 input parameters) +Function 400: ColorTint() (2 input parameters) Name: ColorTint Return type: Color Description: Get color multiplied with another color Param[1]: color (type: Color) Param[2]: tint (type: Color) -Function 396: ColorBrightness() (2 input parameters) +Function 401: ColorBrightness() (2 input parameters) Name: ColorBrightness Return type: Color Description: Get color with brightness correction, brightness factor goes from -1.0f to 1.0f Param[1]: color (type: Color) Param[2]: factor (type: float) -Function 397: ColorContrast() (2 input parameters) +Function 402: ColorContrast() (2 input parameters) Name: ColorContrast Return type: Color Description: Get color with contrast correction, contrast values between -1.0f and 1.0f Param[1]: color (type: Color) Param[2]: contrast (type: float) -Function 398: ColorAlpha() (2 input parameters) +Function 403: ColorAlpha() (2 input parameters) Name: ColorAlpha Return type: Color Description: Get color with alpha applied, alpha goes from 0.0f to 1.0f Param[1]: color (type: Color) Param[2]: alpha (type: float) -Function 399: ColorAlphaBlend() (3 input parameters) +Function 404: ColorAlphaBlend() (3 input parameters) Name: ColorAlphaBlend Return type: Color Description: Get src alpha-blended into dst color with tint Param[1]: dst (type: Color) Param[2]: src (type: Color) Param[3]: tint (type: Color) -Function 400: ColorLerp() (3 input parameters) +Function 405: ColorLerp() (3 input parameters) Name: ColorLerp Return type: Color Description: Get color lerp interpolation between two colors, factor [0.0f..1.0f] Param[1]: color1 (type: Color) Param[2]: color2 (type: Color) Param[3]: factor (type: float) -Function 401: GetColor() (1 input parameters) +Function 406: GetColor() (1 input parameters) Name: GetColor Return type: Color Description: Get Color structure from hexadecimal value Param[1]: hexValue (type: unsigned int) -Function 402: GetPixelColor() (2 input parameters) +Function 407: GetPixelColor() (2 input parameters) Name: GetPixelColor Return type: Color Description: Get Color from a source pixel pointer of certain format Param[1]: srcPtr (type: const void *) Param[2]: format (type: int) -Function 403: SetPixelColor() (3 input parameters) +Function 408: SetPixelColor() (3 input parameters) Name: SetPixelColor Return type: void Description: Set color formatted into destination pixel pointer Param[1]: dstPtr (type: void *) Param[2]: color (type: Color) Param[3]: format (type: int) -Function 404: GetPixelDataSize() (3 input parameters) +Function 409: GetPixelDataSize() (3 input parameters) Name: GetPixelDataSize Return type: int Description: Get pixel data size in bytes for certain format Param[1]: width (type: int) Param[2]: height (type: int) Param[3]: format (type: int) -Function 405: GetFontDefault() (0 input parameters) +Function 410: GetFontDefault() (0 input parameters) Name: GetFontDefault Return type: Font Description: Get the default Font No input parameters -Function 406: LoadFont() (1 input parameters) +Function 411: LoadFont() (1 input parameters) Name: LoadFont Return type: Font Description: Load font from file into GPU memory (VRAM) Param[1]: fileName (type: const char *) -Function 407: LoadFontEx() (4 input parameters) +Function 412: LoadFontEx() (4 input parameters) Name: LoadFontEx Return type: Font - 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 Param[1]: fileName (type: const char *) Param[2]: fontSize (type: int) Param[3]: codepoints (type: const int *) Param[4]: codepointCount (type: int) -Function 408: LoadFontFromImage() (3 input parameters) +Function 413: LoadFontFromImage() (3 input parameters) Name: LoadFontFromImage Return type: Font Description: Load font from Image (XNA style) Param[1]: image (type: Image) Param[2]: key (type: Color) Param[3]: firstChar (type: int) -Function 409: LoadFontFromMemory() (6 input parameters) +Function 414: LoadFontFromMemory() (6 input parameters) Name: LoadFontFromMemory Return type: Font Description: Load font from memory buffer, fileType refers to extension: i.e. '.ttf' @@ -3576,12 +3616,12 @@ Function 409: LoadFontFromMemory() (6 input parameters) Param[4]: fontSize (type: int) Param[5]: codepoints (type: const int *) Param[6]: codepointCount (type: int) -Function 410: IsFontValid() (1 input parameters) +Function 415: IsFontValid() (1 input parameters) Name: IsFontValid Return type: bool Description: Check if font is valid (font data loaded, WARNING: GPU texture not checked) Param[1]: font (type: Font) -Function 411: LoadFontData() (7 input parameters) +Function 416: LoadFontData() (7 input parameters) Name: LoadFontData Return type: GlyphInfo * Description: Load font data for further use @@ -3592,7 +3632,7 @@ Function 411: LoadFontData() (7 input parameters) Param[5]: codepointCount (type: int) Param[6]: type (type: int) Param[7]: glyphCount (type: int *) -Function 412: GenImageFontAtlas() (6 input parameters) +Function 417: GenImageFontAtlas() (6 input parameters) Name: GenImageFontAtlas Return type: Image Description: Generate image font atlas using chars info @@ -3602,30 +3642,30 @@ Function 412: GenImageFontAtlas() (6 input parameters) Param[4]: fontSize (type: int) Param[5]: padding (type: int) Param[6]: packMethod (type: int) -Function 413: UnloadFontData() (2 input parameters) +Function 418: UnloadFontData() (2 input parameters) Name: UnloadFontData Return type: void Description: Unload font chars info data (RAM) Param[1]: glyphs (type: GlyphInfo *) Param[2]: glyphCount (type: int) -Function 414: UnloadFont() (1 input parameters) +Function 419: UnloadFont() (1 input parameters) Name: UnloadFont Return type: void Description: Unload font from GPU memory (VRAM) Param[1]: font (type: Font) -Function 415: ExportFontAsCode() (2 input parameters) +Function 420: ExportFontAsCode() (2 input parameters) Name: ExportFontAsCode Return type: bool Description: Export font as code file, returns true on success Param[1]: font (type: Font) Param[2]: fileName (type: const char *) -Function 416: DrawFPS() (2 input parameters) +Function 421: DrawFPS() (2 input parameters) Name: DrawFPS Return type: void Description: Draw current FPS Param[1]: posX (type: int) Param[2]: posY (type: int) -Function 417: DrawText() (5 input parameters) +Function 422: DrawText() (5 input parameters) Name: DrawText Return type: void Description: Draw text (using default font) @@ -3634,7 +3674,7 @@ Function 417: DrawText() (5 input parameters) Param[3]: posY (type: int) Param[4]: fontSize (type: int) Param[5]: color (type: Color) -Function 418: DrawTextEx() (6 input parameters) +Function 423: DrawTextEx() (6 input parameters) Name: DrawTextEx Return type: void Description: Draw text using font and additional parameters @@ -3644,7 +3684,7 @@ Function 418: DrawTextEx() (6 input parameters) Param[4]: fontSize (type: float) Param[5]: spacing (type: float) Param[6]: tint (type: Color) -Function 419: DrawTextPro() (8 input parameters) +Function 424: DrawTextPro() (8 input parameters) Name: DrawTextPro Return type: void Description: Draw text using Font and pro parameters (rotation) @@ -3656,7 +3696,7 @@ Function 419: DrawTextPro() (8 input parameters) Param[6]: fontSize (type: float) Param[7]: spacing (type: float) Param[8]: tint (type: Color) -Function 420: DrawTextCodepoint() (5 input parameters) +Function 425: DrawTextCodepoint() (5 input parameters) Name: DrawTextCodepoint Return type: void Description: Draw one character (codepoint) @@ -3665,7 +3705,7 @@ Function 420: DrawTextCodepoint() (5 input parameters) Param[3]: position (type: Vector2) Param[4]: fontSize (type: float) Param[5]: tint (type: Color) -Function 421: DrawTextCodepoints() (7 input parameters) +Function 426: DrawTextCodepoints() (7 input parameters) Name: DrawTextCodepoints Return type: void Description: Draw multiple characters (codepoint) @@ -3676,18 +3716,18 @@ Function 421: DrawTextCodepoints() (7 input parameters) Param[5]: fontSize (type: float) Param[6]: spacing (type: float) Param[7]: tint (type: Color) -Function 422: SetTextLineSpacing() (1 input parameters) +Function 427: SetTextLineSpacing() (1 input parameters) Name: SetTextLineSpacing Return type: void Description: Set vertical line spacing when drawing with line-breaks Param[1]: spacing (type: int) -Function 423: MeasureText() (2 input parameters) +Function 428: MeasureText() (2 input parameters) Name: MeasureText Return type: int Description: Measure string width for default font Param[1]: text (type: const char *) Param[2]: fontSize (type: int) -Function 424: MeasureTextEx() (4 input parameters) +Function 429: MeasureTextEx() (4 input parameters) Name: MeasureTextEx Return type: Vector2 Description: Measure string size for Font @@ -3695,7 +3735,7 @@ Function 424: MeasureTextEx() (4 input parameters) Param[2]: text (type: const char *) Param[3]: fontSize (type: float) Param[4]: spacing (type: float) -Function 425: MeasureTextCodepoints() (5 input parameters) +Function 430: MeasureTextCodepoints() (5 input parameters) Name: MeasureTextCodepoints Return type: Vector2 Description: Measure string size for an existing array of codepoints for Font @@ -3704,144 +3744,144 @@ Function 425: MeasureTextCodepoints() (5 input parameters) Param[3]: length (type: int) Param[4]: fontSize (type: float) Param[5]: spacing (type: float) -Function 426: GetGlyphIndex() (2 input parameters) +Function 431: GetGlyphIndex() (2 input parameters) Name: GetGlyphIndex Return type: int Description: Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found Param[1]: font (type: Font) Param[2]: codepoint (type: int) -Function 427: GetGlyphInfo() (2 input parameters) +Function 432: GetGlyphInfo() (2 input parameters) Name: GetGlyphInfo Return type: GlyphInfo Description: Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found Param[1]: font (type: Font) Param[2]: codepoint (type: int) -Function 428: GetGlyphAtlasRec() (2 input parameters) +Function 433: GetGlyphAtlasRec() (2 input parameters) Name: GetGlyphAtlasRec Return type: Rectangle Description: Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found Param[1]: font (type: Font) Param[2]: codepoint (type: int) -Function 429: LoadUTF8() (2 input parameters) +Function 434: LoadUTF8() (2 input parameters) Name: LoadUTF8 Return type: char * Description: Load UTF-8 text encoded from codepoints array Param[1]: codepoints (type: const int *) Param[2]: length (type: int) -Function 430: UnloadUTF8() (1 input parameters) +Function 435: UnloadUTF8() (1 input parameters) Name: UnloadUTF8 Return type: void Description: Unload UTF-8 text encoded from codepoints array Param[1]: text (type: char *) -Function 431: LoadCodepoints() (2 input parameters) +Function 436: LoadCodepoints() (2 input parameters) Name: LoadCodepoints Return type: int * Description: Load all codepoints from a UTF-8 text string, codepoints count returned by parameter Param[1]: text (type: const char *) Param[2]: count (type: int *) -Function 432: UnloadCodepoints() (1 input parameters) +Function 437: UnloadCodepoints() (1 input parameters) Name: UnloadCodepoints Return type: void Description: Unload codepoints data from memory Param[1]: codepoints (type: int *) -Function 433: GetCodepointCount() (1 input parameters) +Function 438: GetCodepointCount() (1 input parameters) Name: GetCodepointCount Return type: int Description: Get total number of codepoints in a UTF-8 encoded string Param[1]: text (type: const char *) -Function 434: GetCodepoint() (2 input parameters) +Function 439: GetCodepoint() (2 input parameters) Name: GetCodepoint Return type: int Description: Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure Param[1]: text (type: const char *) Param[2]: codepointSize (type: int *) -Function 435: GetCodepointNext() (2 input parameters) +Function 440: GetCodepointNext() (2 input parameters) Name: GetCodepointNext Return type: int Description: Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure Param[1]: text (type: const char *) Param[2]: codepointSize (type: int *) -Function 436: GetCodepointPrevious() (2 input parameters) +Function 441: GetCodepointPrevious() (2 input parameters) Name: GetCodepointPrevious Return type: int Description: Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure Param[1]: text (type: const char *) Param[2]: codepointSize (type: int *) -Function 437: CodepointToUTF8() (2 input parameters) +Function 442: CodepointToUTF8() (2 input parameters) Name: CodepointToUTF8 Return type: const char * Description: Encode one codepoint into UTF-8 byte array (array length returned as parameter) Param[1]: codepoint (type: int) Param[2]: utf8Size (type: int *) -Function 438: LoadTextLines() (2 input parameters) +Function 443: LoadTextLines() (2 input parameters) Name: LoadTextLines Return type: char ** Description: Load text as separate lines ('\n') Param[1]: text (type: const char *) Param[2]: count (type: int *) -Function 439: UnloadTextLines() (2 input parameters) +Function 444: UnloadTextLines() (2 input parameters) Name: UnloadTextLines Return type: void Description: Unload text lines Param[1]: text (type: char **) Param[2]: lineCount (type: int) -Function 440: TextCopy() (2 input parameters) +Function 445: TextCopy() (2 input parameters) Name: TextCopy Return type: int Description: Copy one string to another, returns bytes copied Param[1]: dst (type: char *) Param[2]: src (type: const char *) -Function 441: TextIsEqual() (2 input parameters) +Function 446: TextIsEqual() (2 input parameters) Name: TextIsEqual Return type: bool Description: Check if two text strings are equal Param[1]: text1 (type: const char *) Param[2]: text2 (type: const char *) -Function 442: TextLength() (1 input parameters) +Function 447: TextLength() (1 input parameters) Name: TextLength Return type: unsigned int Description: Get text length, checks for '\0' ending Param[1]: text (type: const char *) -Function 443: TextFormat() (2 input parameters) +Function 448: TextFormat() (2 input parameters) Name: TextFormat Return type: const char * Description: Text formatting with variables (sprintf() style) Param[1]: text (type: const char *) Param[2]: args (type: ...) -Function 444: TextSubtext() (3 input parameters) +Function 449: TextSubtext() (3 input parameters) Name: TextSubtext Return type: const char * Description: Get a piece of a text string Param[1]: text (type: const char *) Param[2]: position (type: int) Param[3]: length (type: int) -Function 445: TextRemoveSpaces() (1 input parameters) +Function 450: TextRemoveSpaces() (1 input parameters) Name: TextRemoveSpaces Return type: const char * Description: Remove text spaces, concat words Param[1]: text (type: const char *) -Function 446: GetTextBetween() (3 input parameters) +Function 451: GetTextBetween() (3 input parameters) Name: GetTextBetween Return type: char * Description: Get text between two strings Param[1]: text (type: const char *) Param[2]: begin (type: const char *) Param[3]: end (type: const char *) -Function 447: TextReplace() (3 input parameters) +Function 452: TextReplace() (3 input parameters) Name: TextReplace Return type: char * Description: Replace text string with new string Param[1]: text (type: const char *) Param[2]: search (type: const char *) Param[3]: replacement (type: const char *) -Function 448: TextReplaceAlloc() (3 input parameters) +Function 453: TextReplaceAlloc() (3 input parameters) Name: TextReplaceAlloc Return type: char * Description: Replace text string with new string, memory must be MemFree() Param[1]: text (type: const char *) Param[2]: search (type: const char *) Param[3]: replacement (type: const char *) -Function 449: TextReplaceBetween() (4 input parameters) +Function 454: TextReplaceBetween() (4 input parameters) Name: TextReplaceBetween Return type: char * Description: Replace text between two specific strings @@ -3849,7 +3889,7 @@ Function 449: TextReplaceBetween() (4 input parameters) Param[2]: begin (type: const char *) Param[3]: end (type: const char *) Param[4]: replacement (type: const char *) -Function 450: TextReplaceBetweenAlloc() (4 input parameters) +Function 455: TextReplaceBetweenAlloc() (4 input parameters) Name: TextReplaceBetweenAlloc Return type: char * Description: Replace text between two specific strings, memory must be MemFree() @@ -3857,96 +3897,96 @@ Function 450: TextReplaceBetweenAlloc() (4 input parameters) Param[2]: begin (type: const char *) Param[3]: end (type: const char *) Param[4]: replacement (type: const char *) -Function 451: TextInsert() (3 input parameters) +Function 456: TextInsert() (3 input parameters) Name: TextInsert Return type: char * Description: Insert text in a defined byte position Param[1]: text (type: const char *) Param[2]: insert (type: const char *) Param[3]: position (type: int) -Function 452: TextInsertAlloc() (3 input parameters) +Function 457: TextInsertAlloc() (3 input parameters) Name: TextInsertAlloc Return type: char * Description: Insert text in a defined byte position, memory must be MemFree() Param[1]: text (type: const char *) Param[2]: insert (type: const char *) Param[3]: position (type: int) -Function 453: TextJoin() (3 input parameters) +Function 458: TextJoin() (3 input parameters) Name: TextJoin Return type: char * Description: Join text strings with delimiter Param[1]: textList (type: char **) Param[2]: count (type: int) Param[3]: delimiter (type: const char *) -Function 454: TextSplit() (3 input parameters) +Function 459: TextSplit() (3 input parameters) Name: TextSplit Return type: char ** Description: Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings Param[1]: text (type: const char *) Param[2]: delimiter (type: char) Param[3]: count (type: int *) -Function 455: TextAppend() (3 input parameters) +Function 460: TextAppend() (3 input parameters) Name: TextAppend Return type: void Description: Append text at specific position and move cursor Param[1]: text (type: char *) Param[2]: append (type: const char *) Param[3]: position (type: int *) -Function 456: TextFindIndex() (2 input parameters) +Function 461: TextFindIndex() (2 input parameters) Name: TextFindIndex Return type: int Description: Find first text occurrence within a string, -1 if not found Param[1]: text (type: const char *) Param[2]: search (type: const char *) -Function 457: TextToUpper() (1 input parameters) +Function 462: TextToUpper() (1 input parameters) Name: TextToUpper Return type: char * Description: Get upper case version of provided string Param[1]: text (type: const char *) -Function 458: TextToLower() (1 input parameters) +Function 463: TextToLower() (1 input parameters) Name: TextToLower Return type: char * Description: Get lower case version of provided string Param[1]: text (type: const char *) -Function 459: TextToPascal() (1 input parameters) +Function 464: TextToPascal() (1 input parameters) Name: TextToPascal Return type: char * Description: Get Pascal case notation version of provided string Param[1]: text (type: const char *) -Function 460: TextToSnake() (1 input parameters) +Function 465: TextToSnake() (1 input parameters) Name: TextToSnake Return type: char * Description: Get Snake case notation version of provided string Param[1]: text (type: const char *) -Function 461: TextToCamel() (1 input parameters) +Function 466: TextToCamel() (1 input parameters) Name: TextToCamel Return type: char * Description: Get Camel case notation version of provided string Param[1]: text (type: const char *) -Function 462: TextToInteger() (1 input parameters) +Function 467: TextToInteger() (1 input parameters) Name: TextToInteger Return type: int Description: Get integer value from text Param[1]: text (type: const char *) -Function 463: TextToFloat() (1 input parameters) +Function 468: TextToFloat() (1 input parameters) Name: TextToFloat Return type: float Description: Get float value from text Param[1]: text (type: const char *) -Function 464: DrawLine3D() (3 input parameters) +Function 469: DrawLine3D() (3 input parameters) Name: DrawLine3D Return type: void Description: Draw a line in 3D world space Param[1]: startPos (type: Vector3) Param[2]: endPos (type: Vector3) Param[3]: color (type: Color) -Function 465: DrawPoint3D() (2 input parameters) +Function 470: DrawPoint3D() (2 input parameters) Name: DrawPoint3D Return type: void Description: Draw a point in 3D space, actually a small line Param[1]: position (type: Vector3) Param[2]: color (type: Color) -Function 466: DrawCircle3D() (5 input parameters) +Function 471: DrawCircle3D() (5 input parameters) Name: DrawCircle3D Return type: void Description: Draw a circle in 3D world space @@ -3955,22 +3995,22 @@ Function 466: DrawCircle3D() (5 input parameters) Param[3]: rotationAxis (type: Vector3) Param[4]: rotationAngle (type: float) Param[5]: color (type: Color) -Function 467: DrawTriangle3D() (4 input parameters) +Function 472: DrawTriangle3D() (4 input parameters) Name: DrawTriangle3D Return type: void - Description: Draw a color-filled triangle (vertex in counter-clockwise order!) + Description: Draw a color-filled triangle, counter-clockwise vertex order Param[1]: v1 (type: Vector3) Param[2]: v2 (type: Vector3) Param[3]: v3 (type: Vector3) Param[4]: color (type: Color) -Function 468: DrawTriangleStrip3D() (3 input parameters) +Function 473: DrawTriangleStrip3D() (3 input parameters) Name: DrawTriangleStrip3D Return type: void Description: Draw a triangle strip defined by points Param[1]: points (type: const Vector3 *) Param[2]: pointCount (type: int) Param[3]: color (type: Color) -Function 469: DrawCube() (5 input parameters) +Function 474: DrawCube() (5 input parameters) Name: DrawCube Return type: void Description: Draw cube @@ -3979,14 +4019,14 @@ Function 469: DrawCube() (5 input parameters) Param[3]: height (type: float) Param[4]: length (type: float) Param[5]: color (type: Color) -Function 470: DrawCubeV() (3 input parameters) +Function 475: DrawCubeV() (3 input parameters) Name: DrawCubeV Return type: void Description: Draw cube (Vector version) Param[1]: position (type: Vector3) Param[2]: size (type: Vector3) Param[3]: color (type: Color) -Function 471: DrawCubeWires() (5 input parameters) +Function 476: DrawCubeWires() (5 input parameters) Name: DrawCubeWires Return type: void Description: Draw cube wires @@ -3995,30 +4035,30 @@ Function 471: DrawCubeWires() (5 input parameters) Param[3]: height (type: float) Param[4]: length (type: float) Param[5]: color (type: Color) -Function 472: DrawCubeWiresV() (3 input parameters) +Function 477: DrawCubeWiresV() (3 input parameters) Name: DrawCubeWiresV Return type: void Description: Draw cube wires (Vector version) Param[1]: position (type: Vector3) Param[2]: size (type: Vector3) Param[3]: color (type: Color) -Function 473: DrawSphere() (3 input parameters) +Function 478: DrawSphere() (3 input parameters) Name: DrawSphere Return type: void Description: Draw sphere Param[1]: centerPos (type: Vector3) Param[2]: radius (type: float) Param[3]: color (type: Color) -Function 474: DrawSphereEx() (5 input parameters) +Function 479: DrawSphereEx() (5 input parameters) Name: DrawSphereEx Return type: void - Description: Draw sphere with extended parameters + Description: Draw sphere with defined rings and slices Param[1]: centerPos (type: Vector3) Param[2]: radius (type: float) Param[3]: rings (type: int) Param[4]: slices (type: int) Param[5]: color (type: Color) -Function 475: DrawSphereWires() (5 input parameters) +Function 480: DrawSphereWires() (5 input parameters) Name: DrawSphereWires Return type: void Description: Draw sphere wires @@ -4027,7 +4067,7 @@ Function 475: DrawSphereWires() (5 input parameters) Param[3]: rings (type: int) Param[4]: slices (type: int) Param[5]: color (type: Color) -Function 476: DrawCylinder() (6 input parameters) +Function 481: DrawCylinder() (6 input parameters) Name: DrawCylinder Return type: void Description: Draw a cylinder/cone @@ -4037,7 +4077,7 @@ Function 476: DrawCylinder() (6 input parameters) Param[4]: height (type: float) Param[5]: sides (type: int) Param[6]: color (type: Color) -Function 477: DrawCylinderEx() (6 input parameters) +Function 482: DrawCylinderEx() (6 input parameters) Name: DrawCylinderEx Return type: void Description: Draw a cylinder with base at startPos and top at endPos @@ -4047,7 +4087,7 @@ Function 477: DrawCylinderEx() (6 input parameters) Param[4]: endRadius (type: float) Param[5]: sides (type: int) Param[6]: color (type: Color) -Function 478: DrawCylinderWires() (6 input parameters) +Function 483: DrawCylinderWires() (6 input parameters) Name: DrawCylinderWires Return type: void Description: Draw a cylinder/cone wires @@ -4057,7 +4097,7 @@ Function 478: DrawCylinderWires() (6 input parameters) Param[4]: height (type: float) Param[5]: sides (type: int) Param[6]: color (type: Color) -Function 479: DrawCylinderWiresEx() (6 input parameters) +Function 484: DrawCylinderWiresEx() (6 input parameters) Name: DrawCylinderWiresEx Return type: void Description: Draw a cylinder wires with base at startPos and top at endPos @@ -4067,7 +4107,7 @@ Function 479: DrawCylinderWiresEx() (6 input parameters) Param[4]: endRadius (type: float) Param[5]: sides (type: int) Param[6]: color (type: Color) -Function 480: DrawCapsule() (6 input parameters) +Function 485: DrawCapsule() (6 input parameters) Name: DrawCapsule Return type: void Description: Draw a capsule with the center of its sphere caps at startPos and endPos @@ -4077,7 +4117,7 @@ Function 480: DrawCapsule() (6 input parameters) Param[4]: rings (type: int) Param[5]: slices (type: int) Param[6]: color (type: Color) -Function 481: DrawCapsuleWires() (6 input parameters) +Function 486: DrawCapsuleWires() (6 input parameters) Name: DrawCapsuleWires Return type: void Description: Draw capsule wireframe with the center of its sphere caps at startPos and endPos @@ -4087,51 +4127,51 @@ Function 481: DrawCapsuleWires() (6 input parameters) Param[4]: rings (type: int) Param[5]: slices (type: int) Param[6]: color (type: Color) -Function 482: DrawPlane() (3 input parameters) +Function 487: DrawPlane() (3 input parameters) Name: DrawPlane Return type: void Description: Draw a plane XZ Param[1]: centerPos (type: Vector3) Param[2]: size (type: Vector2) Param[3]: color (type: Color) -Function 483: DrawRay() (2 input parameters) +Function 488: DrawRay() (2 input parameters) Name: DrawRay Return type: void Description: Draw a ray line Param[1]: ray (type: Ray) Param[2]: color (type: Color) -Function 484: DrawGrid() (2 input parameters) +Function 489: DrawGrid() (2 input parameters) Name: DrawGrid Return type: void Description: Draw a grid (centered at (0, 0, 0)) Param[1]: slices (type: int) Param[2]: spacing (type: float) -Function 485: LoadModel() (1 input parameters) +Function 490: LoadModel() (1 input parameters) Name: LoadModel Return type: Model Description: Load model from files (meshes and materials) Param[1]: fileName (type: const char *) -Function 486: LoadModelFromMesh() (1 input parameters) +Function 491: LoadModelFromMesh() (1 input parameters) Name: LoadModelFromMesh Return type: Model Description: Load model from generated mesh (default material) Param[1]: mesh (type: Mesh) -Function 487: IsModelValid() (1 input parameters) +Function 492: IsModelValid() (1 input parameters) Name: IsModelValid Return type: bool Description: Check if model is valid (loaded in GPU, VAO/VBOs) Param[1]: model (type: Model) -Function 488: UnloadModel() (1 input parameters) +Function 493: UnloadModel() (1 input parameters) Name: UnloadModel Return type: void Description: Unload model (including meshes) from memory (RAM and/or VRAM) Param[1]: model (type: Model) -Function 489: GetModelBoundingBox() (1 input parameters) +Function 494: GetModelBoundingBox() (1 input parameters) Name: GetModelBoundingBox Return type: BoundingBox Description: Compute model bounding box limits (considers all meshes) Param[1]: model (type: Model) -Function 490: DrawModel() (4 input parameters) +Function 495: DrawModel() (4 input parameters) Name: DrawModel Return type: void Description: Draw a model (with texture if set) @@ -4139,17 +4179,17 @@ Function 490: DrawModel() (4 input parameters) Param[2]: position (type: Vector3) Param[3]: scale (type: float) Param[4]: tint (type: Color) -Function 491: DrawModelEx() (6 input parameters) +Function 496: DrawModelEx() (6 input parameters) Name: DrawModelEx Return type: void - Description: Draw a model with extended parameters + Description: Draw a model with custom transform Param[1]: model (type: Model) Param[2]: position (type: Vector3) Param[3]: rotationAxis (type: Vector3) Param[4]: rotationAngle (type: float) Param[5]: scale (type: Vector3) Param[6]: tint (type: Color) -Function 492: DrawModelWires() (4 input parameters) +Function 497: DrawModelWires() (4 input parameters) Name: DrawModelWires Return type: void Description: Draw a model wires (with texture if set) @@ -4157,23 +4197,23 @@ Function 492: DrawModelWires() (4 input parameters) Param[2]: position (type: Vector3) Param[3]: scale (type: float) Param[4]: tint (type: Color) -Function 493: DrawModelWiresEx() (6 input parameters) +Function 498: DrawModelWiresEx() (6 input parameters) Name: DrawModelWiresEx Return type: void - Description: Draw a model wires (with texture if set) with extended parameters + Description: Draw a model wires with custom transform Param[1]: model (type: Model) Param[2]: position (type: Vector3) Param[3]: rotationAxis (type: Vector3) Param[4]: rotationAngle (type: float) Param[5]: scale (type: Vector3) Param[6]: tint (type: Color) -Function 494: DrawBoundingBox() (2 input parameters) +Function 499: DrawBoundingBox() (2 input parameters) Name: DrawBoundingBox Return type: void Description: Draw bounding box (wires) Param[1]: box (type: BoundingBox) Param[2]: color (type: Color) -Function 495: DrawBillboard() (5 input parameters) +Function 500: DrawBillboard() (5 input parameters) Name: DrawBillboard Return type: void Description: Draw a billboard texture @@ -4182,7 +4222,7 @@ Function 495: DrawBillboard() (5 input parameters) Param[3]: position (type: Vector3) Param[4]: scale (type: float) Param[5]: tint (type: Color) -Function 496: DrawBillboardRec() (6 input parameters) +Function 501: DrawBillboardRec() (6 input parameters) Name: DrawBillboardRec Return type: void Description: Draw a billboard texture defined by rectangle @@ -4192,7 +4232,7 @@ Function 496: DrawBillboardRec() (6 input parameters) Param[4]: position (type: Vector3) Param[5]: size (type: Vector2) Param[6]: tint (type: Color) -Function 497: DrawBillboardPro() (9 input parameters) +Function 502: DrawBillboardPro() (9 input parameters) Name: DrawBillboardPro Return type: void Description: Draw a billboard texture defined by source rectangle with scaling and rotation @@ -4205,13 +4245,13 @@ Function 497: DrawBillboardPro() (9 input parameters) Param[7]: origin (type: Vector2) Param[8]: rotation (type: float) Param[9]: tint (type: Color) -Function 498: UploadMesh() (2 input parameters) +Function 503: UploadMesh() (2 input parameters) Name: UploadMesh Return type: void Description: Upload mesh vertex data in GPU and provide VAO/VBO ids Param[1]: mesh (type: Mesh *) Param[2]: dynamic (type: bool) -Function 499: UpdateMeshBuffer() (5 input parameters) +Function 504: UpdateMeshBuffer() (5 input parameters) Name: UpdateMeshBuffer Return type: void Description: Update mesh vertex data in GPU for a specific buffer index @@ -4220,19 +4260,19 @@ Function 499: UpdateMeshBuffer() (5 input parameters) Param[3]: data (type: const void *) Param[4]: dataSize (type: int) Param[5]: offset (type: int) -Function 500: UnloadMesh() (1 input parameters) +Function 505: UnloadMesh() (1 input parameters) Name: UnloadMesh Return type: void Description: Unload mesh data from CPU and GPU Param[1]: mesh (type: Mesh) -Function 501: DrawMesh() (3 input parameters) +Function 506: DrawMesh() (3 input parameters) Name: DrawMesh Return type: void Description: Draw a 3d mesh with material and transform Param[1]: mesh (type: Mesh) Param[2]: material (type: Material) Param[3]: transform (type: Matrix) -Function 502: DrawMeshInstanced() (4 input parameters) +Function 507: DrawMeshInstanced() (4 input parameters) Name: DrawMeshInstanced Return type: void Description: Draw multiple mesh instances with material and different transforms @@ -4240,35 +4280,35 @@ Function 502: DrawMeshInstanced() (4 input parameters) Param[2]: material (type: Material) Param[3]: transforms (type: const Matrix *) Param[4]: instances (type: int) -Function 503: GetMeshBoundingBox() (1 input parameters) +Function 508: GetMeshBoundingBox() (1 input parameters) Name: GetMeshBoundingBox Return type: BoundingBox Description: Compute mesh bounding box limits Param[1]: mesh (type: Mesh) -Function 504: GenMeshTangents() (1 input parameters) +Function 509: GenMeshTangents() (1 input parameters) Name: GenMeshTangents Return type: void Description: Compute mesh tangents Param[1]: mesh (type: Mesh *) -Function 505: ExportMesh() (2 input parameters) +Function 510: ExportMesh() (2 input parameters) Name: ExportMesh Return type: bool Description: Export mesh data to file, returns true on success Param[1]: mesh (type: Mesh) Param[2]: fileName (type: const char *) -Function 506: ExportMeshAsCode() (2 input parameters) +Function 511: ExportMeshAsCode() (2 input parameters) Name: ExportMeshAsCode Return type: bool Description: Export mesh as code file (.h) defining multiple arrays of vertex attributes Param[1]: mesh (type: Mesh) Param[2]: fileName (type: const char *) -Function 507: GenMeshPoly() (2 input parameters) +Function 512: GenMeshPoly() (2 input parameters) Name: GenMeshPoly Return type: Mesh Description: Generate polygonal mesh Param[1]: sides (type: int) Param[2]: radius (type: float) -Function 508: GenMeshPlane() (4 input parameters) +Function 513: GenMeshPlane() (4 input parameters) Name: GenMeshPlane Return type: Mesh Description: Generate plane mesh (with subdivisions) @@ -4276,42 +4316,42 @@ Function 508: GenMeshPlane() (4 input parameters) Param[2]: length (type: float) Param[3]: resX (type: int) Param[4]: resZ (type: int) -Function 509: GenMeshCube() (3 input parameters) +Function 514: GenMeshCube() (3 input parameters) Name: GenMeshCube Return type: Mesh Description: Generate cuboid mesh Param[1]: width (type: float) Param[2]: height (type: float) Param[3]: length (type: float) -Function 510: GenMeshSphere() (3 input parameters) +Function 515: GenMeshSphere() (3 input parameters) Name: GenMeshSphere Return type: Mesh Description: Generate sphere mesh (standard sphere) Param[1]: radius (type: float) Param[2]: rings (type: int) Param[3]: slices (type: int) -Function 511: GenMeshHemiSphere() (3 input parameters) +Function 516: GenMeshHemiSphere() (3 input parameters) Name: GenMeshHemiSphere Return type: Mesh Description: Generate half-sphere mesh (no bottom cap) Param[1]: radius (type: float) Param[2]: rings (type: int) Param[3]: slices (type: int) -Function 512: GenMeshCylinder() (3 input parameters) +Function 517: GenMeshCylinder() (3 input parameters) Name: GenMeshCylinder Return type: Mesh Description: Generate cylinder mesh Param[1]: radius (type: float) Param[2]: height (type: float) Param[3]: slices (type: int) -Function 513: GenMeshCone() (3 input parameters) +Function 518: GenMeshCone() (3 input parameters) Name: GenMeshCone Return type: Mesh Description: Generate cone/pyramid mesh Param[1]: radius (type: float) Param[2]: height (type: float) Param[3]: slices (type: int) -Function 514: GenMeshTorus() (4 input parameters) +Function 519: GenMeshTorus() (4 input parameters) Name: GenMeshTorus Return type: Mesh Description: Generate torus mesh @@ -4319,7 +4359,7 @@ Function 514: GenMeshTorus() (4 input parameters) Param[2]: size (type: float) Param[3]: radSeg (type: int) Param[4]: sides (type: int) -Function 515: GenMeshKnot() (4 input parameters) +Function 520: GenMeshKnot() (4 input parameters) Name: GenMeshKnot Return type: Mesh Description: Generate trefoil knot mesh @@ -4327,67 +4367,67 @@ Function 515: GenMeshKnot() (4 input parameters) Param[2]: size (type: float) Param[3]: radSeg (type: int) Param[4]: sides (type: int) -Function 516: GenMeshHeightmap() (2 input parameters) +Function 521: GenMeshHeightmap() (2 input parameters) Name: GenMeshHeightmap Return type: Mesh Description: Generate heightmap mesh from image data Param[1]: heightmap (type: Image) Param[2]: size (type: Vector3) -Function 517: GenMeshCubicmap() (2 input parameters) +Function 522: GenMeshCubicmap() (2 input parameters) Name: GenMeshCubicmap Return type: Mesh Description: Generate cubes-based map mesh from image data Param[1]: cubicmap (type: Image) Param[2]: cubeSize (type: Vector3) -Function 518: LoadMaterials() (2 input parameters) +Function 523: LoadMaterials() (2 input parameters) Name: LoadMaterials Return type: Material * Description: Load materials from model file Param[1]: fileName (type: const char *) Param[2]: materialCount (type: int *) -Function 519: LoadMaterialDefault() (0 input parameters) +Function 524: LoadMaterialDefault() (0 input parameters) Name: LoadMaterialDefault Return type: Material Description: Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) No input parameters -Function 520: IsMaterialValid() (1 input parameters) +Function 525: IsMaterialValid() (1 input parameters) Name: IsMaterialValid Return type: bool Description: Check if material is valid (shader assigned, map textures loaded in GPU) Param[1]: material (type: Material) -Function 521: UnloadMaterial() (1 input parameters) +Function 526: UnloadMaterial() (1 input parameters) Name: UnloadMaterial Return type: void Description: Unload material from GPU memory (VRAM) Param[1]: material (type: Material) -Function 522: SetMaterialTexture() (3 input parameters) +Function 527: SetMaterialTexture() (3 input parameters) Name: SetMaterialTexture Return type: void Description: Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...) Param[1]: material (type: Material *) Param[2]: mapType (type: int) Param[3]: texture (type: Texture2D) -Function 523: SetModelMeshMaterial() (3 input parameters) +Function 528: SetModelMeshMaterial() (3 input parameters) Name: SetModelMeshMaterial Return type: void Description: Set material for a mesh Param[1]: model (type: Model *) Param[2]: meshId (type: int) Param[3]: materialId (type: int) -Function 524: LoadModelAnimations() (2 input parameters) +Function 529: LoadModelAnimations() (2 input parameters) Name: LoadModelAnimations Return type: ModelAnimation * Description: Load model animations from file Param[1]: fileName (type: const char *) Param[2]: animCount (type: int *) -Function 525: UpdateModelAnimation() (3 input parameters) +Function 530: UpdateModelAnimation() (3 input parameters) Name: UpdateModelAnimation Return type: void Description: Update model animation pose (vertex buffers and bone matrices) Param[1]: model (type: Model) Param[2]: anim (type: ModelAnimation) Param[3]: frame (type: float) -Function 526: UpdateModelAnimationEx() (6 input parameters) +Function 531: UpdateModelAnimationEx() (6 input parameters) Name: UpdateModelAnimationEx Return type: void Description: Update model animation pose, blending two animations @@ -4397,19 +4437,19 @@ Function 526: UpdateModelAnimationEx() (6 input parameters) Param[4]: animB (type: ModelAnimation) Param[5]: frameB (type: float) Param[6]: blend (type: float) -Function 527: UnloadModelAnimations() (2 input parameters) +Function 532: UnloadModelAnimations() (2 input parameters) Name: UnloadModelAnimations Return type: void Description: Unload animation array data Param[1]: animations (type: ModelAnimation *) Param[2]: animCount (type: int) -Function 528: IsModelAnimationValid() (2 input parameters) +Function 533: IsModelAnimationValid() (2 input parameters) Name: IsModelAnimationValid Return type: bool Description: Check model animation skeleton match Param[1]: model (type: Model) Param[2]: anim (type: ModelAnimation) -Function 529: CheckCollisionSpheres() (4 input parameters) +Function 534: CheckCollisionSpheres() (4 input parameters) Name: CheckCollisionSpheres Return type: bool Description: Check collision between two spheres @@ -4417,40 +4457,40 @@ Function 529: CheckCollisionSpheres() (4 input parameters) Param[2]: radius1 (type: float) Param[3]: center2 (type: Vector3) Param[4]: radius2 (type: float) -Function 530: CheckCollisionBoxes() (2 input parameters) +Function 535: CheckCollisionBoxes() (2 input parameters) Name: CheckCollisionBoxes Return type: bool Description: Check collision between two bounding boxes Param[1]: box1 (type: BoundingBox) Param[2]: box2 (type: BoundingBox) -Function 531: CheckCollisionBoxSphere() (3 input parameters) +Function 536: CheckCollisionBoxSphere() (3 input parameters) Name: CheckCollisionBoxSphere Return type: bool Description: Check collision between box and sphere Param[1]: box (type: BoundingBox) Param[2]: center (type: Vector3) Param[3]: radius (type: float) -Function 532: GetRayCollisionSphere() (3 input parameters) +Function 537: GetRayCollisionSphere() (3 input parameters) Name: GetRayCollisionSphere Return type: RayCollision Description: Get collision info between ray and sphere Param[1]: ray (type: Ray) Param[2]: center (type: Vector3) Param[3]: radius (type: float) -Function 533: GetRayCollisionBox() (2 input parameters) +Function 538: GetRayCollisionBox() (2 input parameters) Name: GetRayCollisionBox Return type: RayCollision Description: Get collision info between ray and box Param[1]: ray (type: Ray) Param[2]: box (type: BoundingBox) -Function 534: GetRayCollisionMesh() (3 input parameters) +Function 539: GetRayCollisionMesh() (3 input parameters) Name: GetRayCollisionMesh Return type: RayCollision Description: Get collision info between ray and mesh Param[1]: ray (type: Ray) Param[2]: mesh (type: Mesh) Param[3]: transform (type: Matrix) -Function 535: GetRayCollisionTriangle() (4 input parameters) +Function 540: GetRayCollisionTriangle() (4 input parameters) Name: GetRayCollisionTriangle Return type: RayCollision Description: Get collision info between ray and triangle @@ -4458,7 +4498,7 @@ Function 535: GetRayCollisionTriangle() (4 input parameters) Param[2]: p1 (type: Vector3) Param[3]: p2 (type: Vector3) Param[4]: p3 (type: Vector3) -Function 536: GetRayCollisionQuad() (5 input parameters) +Function 541: GetRayCollisionQuad() (5 input parameters) Name: GetRayCollisionQuad Return type: RayCollision Description: Get collision info between ray and quad @@ -4467,158 +4507,158 @@ Function 536: GetRayCollisionQuad() (5 input parameters) Param[3]: p2 (type: Vector3) Param[4]: p3 (type: Vector3) Param[5]: p4 (type: Vector3) -Function 537: InitAudioDevice() (0 input parameters) +Function 542: InitAudioDevice() (0 input parameters) Name: InitAudioDevice Return type: void Description: Initialize audio device and context No input parameters -Function 538: CloseAudioDevice() (0 input parameters) +Function 543: CloseAudioDevice() (0 input parameters) Name: CloseAudioDevice Return type: void Description: Close the audio device and context No input parameters -Function 539: IsAudioDeviceReady() (0 input parameters) +Function 544: IsAudioDeviceReady() (0 input parameters) Name: IsAudioDeviceReady Return type: bool Description: Check if audio device has been initialized successfully No input parameters -Function 540: SetMasterVolume() (1 input parameters) +Function 545: SetMasterVolume() (1 input parameters) Name: SetMasterVolume Return type: void Description: Set master volume (listener) Param[1]: volume (type: float) -Function 541: GetMasterVolume() (0 input parameters) +Function 546: GetMasterVolume() (0 input parameters) Name: GetMasterVolume Return type: float Description: Get master volume (listener) No input parameters -Function 542: LoadWave() (1 input parameters) +Function 547: LoadWave() (1 input parameters) Name: LoadWave Return type: Wave Description: Load wave data from file Param[1]: fileName (type: const char *) -Function 543: LoadWaveFromMemory() (3 input parameters) +Function 548: LoadWaveFromMemory() (3 input parameters) Name: LoadWaveFromMemory Return type: Wave Description: Load wave from memory buffer, fileType refers to extension: i.e. '.wav' Param[1]: fileType (type: const char *) Param[2]: fileData (type: const unsigned char *) Param[3]: dataSize (type: int) -Function 544: IsWaveValid() (1 input parameters) +Function 549: IsWaveValid() (1 input parameters) Name: IsWaveValid Return type: bool Description: Check if wave data is valid (data loaded and parameters) Param[1]: wave (type: Wave) -Function 545: LoadSound() (1 input parameters) +Function 550: LoadSound() (1 input parameters) Name: LoadSound Return type: Sound Description: Load sound from file Param[1]: fileName (type: const char *) -Function 546: LoadSoundFromWave() (1 input parameters) +Function 551: LoadSoundFromWave() (1 input parameters) Name: LoadSoundFromWave Return type: Sound Description: Load sound from wave data Param[1]: wave (type: Wave) -Function 547: LoadSoundAlias() (1 input parameters) +Function 552: LoadSoundAlias() (1 input parameters) Name: LoadSoundAlias Return type: Sound Description: Load sound alias, new sound that shares the same sample data as the source sound, does not own the sound data Param[1]: source (type: Sound) -Function 548: IsSoundValid() (1 input parameters) +Function 553: IsSoundValid() (1 input parameters) Name: IsSoundValid Return type: bool Description: Check if sound is valid (data loaded and buffers initialized) Param[1]: sound (type: Sound) -Function 549: UpdateSound() (3 input parameters) +Function 554: UpdateSound() (3 input parameters) Name: UpdateSound Return type: void Description: Update sound buffer with new data (default data format: 32 bit float, stereo) Param[1]: sound (type: Sound) Param[2]: data (type: const void *) Param[3]: frameCount (type: int) -Function 550: UnloadWave() (1 input parameters) +Function 555: UnloadWave() (1 input parameters) Name: UnloadWave Return type: void Description: Unload wave data Param[1]: wave (type: Wave) -Function 551: UnloadSound() (1 input parameters) +Function 556: UnloadSound() (1 input parameters) Name: UnloadSound Return type: void Description: Unload sound Param[1]: sound (type: Sound) -Function 552: UnloadSoundAlias() (1 input parameters) +Function 557: UnloadSoundAlias() (1 input parameters) Name: UnloadSoundAlias Return type: void Description: Unload sound alias (does not deallocate sample data) Param[1]: alias (type: Sound) -Function 553: ExportWave() (2 input parameters) +Function 558: ExportWave() (2 input parameters) Name: ExportWave Return type: bool Description: Export wave data to file, returns true on success Param[1]: wave (type: Wave) Param[2]: fileName (type: const char *) -Function 554: ExportWaveAsCode() (2 input parameters) +Function 559: ExportWaveAsCode() (2 input parameters) Name: ExportWaveAsCode Return type: bool Description: Export wave sample data to code (.h), returns true on success Param[1]: wave (type: Wave) Param[2]: fileName (type: const char *) -Function 555: PlaySound() (1 input parameters) +Function 560: PlaySound() (1 input parameters) Name: PlaySound Return type: void Description: Play a sound Param[1]: sound (type: Sound) -Function 556: StopSound() (1 input parameters) +Function 561: StopSound() (1 input parameters) Name: StopSound Return type: void Description: Stop playing a sound Param[1]: sound (type: Sound) -Function 557: PauseSound() (1 input parameters) +Function 562: PauseSound() (1 input parameters) Name: PauseSound Return type: void Description: Pause a sound Param[1]: sound (type: Sound) -Function 558: ResumeSound() (1 input parameters) +Function 563: ResumeSound() (1 input parameters) Name: ResumeSound Return type: void Description: Resume a paused sound Param[1]: sound (type: Sound) -Function 559: IsSoundPlaying() (1 input parameters) +Function 564: IsSoundPlaying() (1 input parameters) Name: IsSoundPlaying Return type: bool Description: Check if sound is currently playing Param[1]: sound (type: Sound) -Function 560: SetSoundVolume() (2 input parameters) +Function 565: SetSoundVolume() (2 input parameters) Name: SetSoundVolume Return type: void Description: Set volume for a sound (1.0 is max level) Param[1]: sound (type: Sound) Param[2]: volume (type: float) -Function 561: SetSoundPitch() (2 input parameters) +Function 566: SetSoundPitch() (2 input parameters) Name: SetSoundPitch Return type: void Description: Set pitch for a sound (1.0 is base level) Param[1]: sound (type: Sound) Param[2]: pitch (type: float) -Function 562: SetSoundPan() (2 input parameters) +Function 567: SetSoundPan() (2 input parameters) Name: SetSoundPan Return type: void Description: Set pan for a sound (-1.0 left, 0.0 center, 1.0 right) Param[1]: sound (type: Sound) Param[2]: pan (type: float) -Function 563: WaveCopy() (1 input parameters) +Function 568: WaveCopy() (1 input parameters) Name: WaveCopy Return type: Wave Description: Copy a wave to a new wave Param[1]: wave (type: Wave) -Function 564: WaveCrop() (3 input parameters) +Function 569: WaveCrop() (3 input parameters) Name: WaveCrop Return type: void Description: Crop a wave to defined frames range Param[1]: wave (type: Wave *) Param[2]: initFrame (type: int) Param[3]: finalFrame (type: int) -Function 565: WaveFormat() (4 input parameters) +Function 570: WaveFormat() (4 input parameters) Name: WaveFormat Return type: void Description: Convert wave data to desired format @@ -4626,203 +4666,203 @@ Function 565: WaveFormat() (4 input parameters) Param[2]: sampleRate (type: int) Param[3]: sampleSize (type: int) Param[4]: channels (type: int) -Function 566: LoadWaveSamples() (1 input parameters) +Function 571: LoadWaveSamples() (1 input parameters) Name: LoadWaveSamples Return type: float * Description: Load samples data from wave as a 32bit float data array Param[1]: wave (type: Wave) -Function 567: UnloadWaveSamples() (1 input parameters) +Function 572: UnloadWaveSamples() (1 input parameters) Name: UnloadWaveSamples Return type: void Description: Unload samples data loaded with LoadWaveSamples() Param[1]: samples (type: float *) -Function 568: LoadMusicStream() (1 input parameters) +Function 573: LoadMusicStream() (1 input parameters) Name: LoadMusicStream Return type: Music Description: Load music stream from file Param[1]: fileName (type: const char *) -Function 569: LoadMusicStreamFromMemory() (3 input parameters) +Function 574: LoadMusicStreamFromMemory() (3 input parameters) Name: LoadMusicStreamFromMemory Return type: Music Description: Load music stream from data Param[1]: fileType (type: const char *) Param[2]: data (type: const unsigned char *) Param[3]: dataSize (type: int) -Function 570: IsMusicValid() (1 input parameters) +Function 575: IsMusicValid() (1 input parameters) Name: IsMusicValid Return type: bool Description: Check if music stream is valid (context and buffers initialized) Param[1]: music (type: Music) -Function 571: UnloadMusicStream() (1 input parameters) +Function 576: UnloadMusicStream() (1 input parameters) Name: UnloadMusicStream Return type: void Description: Unload music stream Param[1]: music (type: Music) -Function 572: PlayMusicStream() (1 input parameters) +Function 577: PlayMusicStream() (1 input parameters) Name: PlayMusicStream Return type: void Description: Start music playing Param[1]: music (type: Music) -Function 573: IsMusicStreamPlaying() (1 input parameters) +Function 578: IsMusicStreamPlaying() (1 input parameters) Name: IsMusicStreamPlaying Return type: bool Description: Check if music is playing Param[1]: music (type: Music) -Function 574: UpdateMusicStream() (1 input parameters) +Function 579: UpdateMusicStream() (1 input parameters) Name: UpdateMusicStream Return type: void Description: Update buffers for music streaming Param[1]: music (type: Music) -Function 575: StopMusicStream() (1 input parameters) +Function 580: StopMusicStream() (1 input parameters) Name: StopMusicStream Return type: void Description: Stop music playing Param[1]: music (type: Music) -Function 576: PauseMusicStream() (1 input parameters) +Function 581: PauseMusicStream() (1 input parameters) Name: PauseMusicStream Return type: void Description: Pause music playing Param[1]: music (type: Music) -Function 577: ResumeMusicStream() (1 input parameters) +Function 582: ResumeMusicStream() (1 input parameters) Name: ResumeMusicStream Return type: void Description: Resume playing paused music Param[1]: music (type: Music) -Function 578: SeekMusicStream() (2 input parameters) +Function 583: SeekMusicStream() (2 input parameters) Name: SeekMusicStream Return type: void Description: Seek music to a position (in seconds) Param[1]: music (type: Music) Param[2]: position (type: float) -Function 579: SetMusicVolume() (2 input parameters) +Function 584: SetMusicVolume() (2 input parameters) Name: SetMusicVolume Return type: void Description: Set volume for music (1.0 is max level) Param[1]: music (type: Music) Param[2]: volume (type: float) -Function 580: SetMusicPitch() (2 input parameters) +Function 585: SetMusicPitch() (2 input parameters) Name: SetMusicPitch Return type: void Description: Set pitch for music (1.0 is base level) Param[1]: music (type: Music) Param[2]: pitch (type: float) -Function 581: SetMusicPan() (2 input parameters) +Function 586: SetMusicPan() (2 input parameters) Name: SetMusicPan Return type: void Description: Set pan for music (-1.0 left, 0.0 center, 1.0 right) Param[1]: music (type: Music) Param[2]: pan (type: float) -Function 582: GetMusicTimeLength() (1 input parameters) +Function 587: GetMusicTimeLength() (1 input parameters) Name: GetMusicTimeLength Return type: float Description: Get music time length (in seconds) Param[1]: music (type: Music) -Function 583: GetMusicTimePlayed() (1 input parameters) +Function 588: GetMusicTimePlayed() (1 input parameters) Name: GetMusicTimePlayed Return type: float Description: Get current music time played (in seconds) Param[1]: music (type: Music) -Function 584: LoadAudioStream() (3 input parameters) +Function 589: LoadAudioStream() (3 input parameters) Name: LoadAudioStream Return type: AudioStream Description: Load audio stream (to stream raw audio pcm data) Param[1]: sampleRate (type: unsigned int) Param[2]: sampleSize (type: unsigned int) Param[3]: channels (type: unsigned int) -Function 585: IsAudioStreamValid() (1 input parameters) +Function 590: IsAudioStreamValid() (1 input parameters) Name: IsAudioStreamValid Return type: bool Description: Check if an audio stream is valid (buffers initialized) Param[1]: stream (type: AudioStream) -Function 586: UnloadAudioStream() (1 input parameters) +Function 591: UnloadAudioStream() (1 input parameters) Name: UnloadAudioStream Return type: void Description: Unload audio stream and free memory Param[1]: stream (type: AudioStream) -Function 587: UpdateAudioStream() (3 input parameters) +Function 592: UpdateAudioStream() (3 input parameters) Name: UpdateAudioStream Return type: void Description: Update audio stream buffers with data Param[1]: stream (type: AudioStream) Param[2]: data (type: const void *) Param[3]: frameCount (type: int) -Function 588: IsAudioStreamProcessed() (1 input parameters) +Function 593: IsAudioStreamProcessed() (1 input parameters) Name: IsAudioStreamProcessed Return type: bool Description: Check if any audio stream buffers requires refill Param[1]: stream (type: AudioStream) -Function 589: PlayAudioStream() (1 input parameters) +Function 594: PlayAudioStream() (1 input parameters) Name: PlayAudioStream Return type: void Description: Play audio stream Param[1]: stream (type: AudioStream) -Function 590: PauseAudioStream() (1 input parameters) +Function 595: PauseAudioStream() (1 input parameters) Name: PauseAudioStream Return type: void Description: Pause audio stream Param[1]: stream (type: AudioStream) -Function 591: ResumeAudioStream() (1 input parameters) +Function 596: ResumeAudioStream() (1 input parameters) Name: ResumeAudioStream Return type: void Description: Resume audio stream Param[1]: stream (type: AudioStream) -Function 592: IsAudioStreamPlaying() (1 input parameters) +Function 597: IsAudioStreamPlaying() (1 input parameters) Name: IsAudioStreamPlaying Return type: bool Description: Check if audio stream is playing Param[1]: stream (type: AudioStream) -Function 593: StopAudioStream() (1 input parameters) +Function 598: StopAudioStream() (1 input parameters) Name: StopAudioStream Return type: void Description: Stop audio stream Param[1]: stream (type: AudioStream) -Function 594: SetAudioStreamVolume() (2 input parameters) +Function 599: SetAudioStreamVolume() (2 input parameters) Name: SetAudioStreamVolume Return type: void Description: Set volume for audio stream (1.0 is max level) Param[1]: stream (type: AudioStream) Param[2]: volume (type: float) -Function 595: SetAudioStreamPitch() (2 input parameters) +Function 600: SetAudioStreamPitch() (2 input parameters) Name: SetAudioStreamPitch Return type: void Description: Set pitch for audio stream (1.0 is base level) Param[1]: stream (type: AudioStream) Param[2]: pitch (type: float) -Function 596: SetAudioStreamPan() (2 input parameters) +Function 601: SetAudioStreamPan() (2 input parameters) Name: SetAudioStreamPan Return type: void Description: Set pan for audio stream (-1.0 left, 0.0 center, 1.0 right) Param[1]: stream (type: AudioStream) Param[2]: pan (type: float) -Function 597: SetAudioStreamBufferSizeDefault() (1 input parameters) +Function 602: SetAudioStreamBufferSizeDefault() (1 input parameters) Name: SetAudioStreamBufferSizeDefault Return type: void Description: Default size for new audio streams Param[1]: size (type: int) -Function 598: SetAudioStreamCallback() (2 input parameters) +Function 603: SetAudioStreamCallback() (2 input parameters) Name: SetAudioStreamCallback Return type: void Description: Audio thread callback to request new data Param[1]: stream (type: AudioStream) Param[2]: callback (type: AudioCallback) -Function 599: AttachAudioStreamProcessor() (2 input parameters) +Function 604: AttachAudioStreamProcessor() (2 input parameters) Name: AttachAudioStreamProcessor Return type: void Description: Attach audio stream processor to stream, receives frames x 2 samples as 'float' (stereo) Param[1]: stream (type: AudioStream) Param[2]: processor (type: AudioCallback) -Function 600: DetachAudioStreamProcessor() (2 input parameters) +Function 605: DetachAudioStreamProcessor() (2 input parameters) Name: DetachAudioStreamProcessor Return type: void Description: Detach audio stream processor from stream Param[1]: stream (type: AudioStream) Param[2]: processor (type: AudioCallback) -Function 601: AttachAudioMixedProcessor() (1 input parameters) +Function 606: AttachAudioMixedProcessor() (1 input parameters) Name: AttachAudioMixedProcessor Return type: void Description: Attach audio stream processor to the entire audio pipeline, receives frames x 2 samples as 'float' (stereo) Param[1]: processor (type: AudioCallback) -Function 602: DetachAudioMixedProcessor() (1 input parameters) +Function 607: DetachAudioMixedProcessor() (1 input parameters) Name: DetachAudioMixedProcessor Return type: void Description: Detach audio stream processor from the entire audio pipeline diff --git a/tools/rlparser/output/raylib_api.xml b/tools/rlparser/output/raylib_api.xml index 7fd73e2ed..ec7711ee7 100644 --- a/tools/rlparser/output/raylib_api.xml +++ b/tools/rlparser/output/raylib_api.xml @@ -1,6 +1,6 @@ - + @@ -57,7 +57,6 @@ - @@ -682,7 +681,7 @@ - + @@ -1403,6 +1402,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1447,6 +1574,12 @@ + + + + + + @@ -1491,134 +1624,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2067,63 +2072,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -2161,11 +2113,93 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2242,7 +2276,7 @@ - + @@ -2344,7 +2378,7 @@ - + @@ -2628,7 +2662,7 @@ - + @@ -2668,7 +2702,7 @@ - + @@ -2764,7 +2798,7 @@ - + @@ -2778,7 +2812,7 @@ - +