Ray
61cfd1afcb
Minor tweaks
2024-07-01 13:05:20 +02:00
Ray
1e1061d5c7
REVIEWED: Formatting, follow raylib coding conventions
2024-06-30 11:37:58 +02:00
Ray
17cbc75aa7
REVIEWED: Formatting, follow raylib coding conventions
2024-06-30 11:07:38 +02:00
Ray
4239e66c55
Update rshapes.c
2024-06-25 21:39:43 +02:00
Ray
3e441ae98b
REVIEWED: DrawLine()
#4075
2024-06-25 16:37:20 +02:00
Ray
385e60dd41
Minor tweaks
2024-06-24 18:41:33 +02:00
Ray
715633e0de
REVIEWED: Spline cubic bezier example
2024-06-16 10:41:47 +02:00
Santiago Pelufo
640eaca8bf
[rshapes] Fix multisegment Bezier splines. ( #3744 )
...
* [rshapes] Fix multisegment Bezier splines.
It seems to me that these functions are wrong, if you step the index by 1 you move to a control point instead of the next segment.
* Fix example shapes/shapes_splines_drawing for bezier splines.
* Draw circles to fill gaps between bezier segments.
2024-06-16 10:21:54 +02:00
kai-z99
fca53c7799
optimize ( #4065 )
2024-06-14 08:19:17 +02:00
Jeffery Myers
2609211207
[SHAPES] Make functions that draw point arrays take them as const ( #4051 )
...
* Update raylib_api.* by CI
* make functions that take a pointer to an array take them as const pointers
* Update raylib_api.* by CI
* fix comment alignment.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-11 11:51:49 +02:00
kai-z99
606cc1d897
[rshapes]Circle line collision function ( #4018 )
...
* inital function
* working 1
* optimize
* optimized dot product
* simplify
* cleanup
* cleanup
* cleanup
* comment
* var name change
* epsilon
2024-05-30 08:24:44 +02:00
Ray
763129e96b
Reviewed some warnings
2024-05-01 18:12:57 +02:00
Ray
e0027eb767
REVIEWED: DrawLine()
to avoid pixel rounding issues #3931
2024-04-28 22:59:35 +02:00
Ray
3caa424ad4
Review formatting
2024-04-21 12:29:09 +02:00
Ray
41b0c5c4f9
REVIEWED: DrawRectangleLines()
pixel offset
...
This could be actually very tricky and GPU/drivers dependant...
2024-04-20 19:58:10 +02:00
Ray
b51f4db8c2
REVIEWED: DrawRectangleLines()
#3884
...
For consistency, now _almost_ all `Draw*Lines()` functions use `RL_LINES` mode for drawing. It solves the linked issue but it can have other implications, as mentioned in the WARNING comment in `DrawRectangleLines()`.
Side note: `DrawRectangleRoundedLines()` now should be reviewed for consistency.
2024-04-20 19:53:59 +02:00
Ray
29ce13b777
Code gardening
...
- Review formatting
- Improve readability for some functions result return
- Minimize early returns
- Align LoadFileData() to UnloadFileData()
2024-04-20 13:53:13 +02:00
Ray
fea3395fc1
Review formatting
2024-02-29 18:50:44 +01:00
Ray
e42e3188f5
Remove some unneeded line breaks
2024-02-18 11:59:40 +01:00
Ray
dd8b5613ca
REVIEWED: DrawPixel()
not drawing
2024-02-08 08:45:59 +01:00
Antonio Raúl
ef92ced370
fix CheckCollisionPointPoly ( #3750 )
2024-01-22 11:35:55 +01:00
Ray
3f1e59a7cf
Update copyright to 2024
2024-01-02 20:58:12 +01:00
Jeffery Myers
ad64a43b34
[rshapes] Expose shapes drawing texture and rectangle ( #3677 )
...
* provide access to the shape texture so that shapes can be extended outside of raylib with the same optimizations as internal raylib functions.
* PR feedback, comply with C standards
* oops
2023-12-28 15:40:03 +01:00
Ray
f3adde8bbd
REVIEWED: DrawSplineLinear()
to SUPPORT_SPLINE_MITERS
2023-12-15 18:40:19 +01:00
Toctave
0fc1765ff3
Implement miters in DrawSplineLinear ( #3585 )
...
* Implement miters in DrawSplineLinear
* Follow raylib style
2023-12-15 18:34:34 +01:00
ubkp
e84099bfd4
Fix CheckCollisionCircleRec() ( #3584 )
2023-11-30 10:11:45 +01:00
Ray
bd3ffa7db3
REDESIGNED: Spline drawing functionality
...
This change allows more versatile and consistent splines drawing. It also gives more control to advance users to draw splines as individual segments.
2023-11-08 17:42:35 +01:00
Ray
f01d3db739
ADDED: GetSplinePoint*()
functions for spline evaluation
...
RENAMED: `DrawLine<spline_type>()` to `DrawSpline<spline_type>()` for more consistent and clear naming
REVIEWED: Bezier drawing parameters order, more consistent
REVIEWED: Spline-based examples -WIP-
2023-11-07 19:25:49 +01:00
Ray
e4547eb422
Remove trail spaces
2023-10-26 23:56:03 +02:00
Peter0x44
e33e9da277
Add DrawCircleLinesV for consistency ( #3452 )
...
ImageDrawCircleLinesV already existed, so I'm not sure why this was
missing. It is trivial to implement, anyway
2023-10-22 17:13:49 +02:00
Ray
8189bddefb
tweaks
2023-08-20 21:36:36 +02:00
Ray
bf705a63de
REVIEWED: DrawLineCatmullRom()
2023-08-12 19:31:29 +02:00
Ray
d873d0f173
ISSUE: DrawLineCatmullRom()
, needs review
2023-08-12 18:45:59 +02:00
Ray
9161c55d59
REVIEWED: Code formatting
2023-08-12 18:40:18 +02:00
Ray
fc88518067
ADDED: Spline drawing functions ->
...
- `DrawLineBSpline()`
- `DrawLineCatmullRom()`
2023-08-12 14:00:50 +02:00
RadsammyT
0959f6ebf6
fix typos in rmodels, rshapes, rtext modules ( #3236 )
2023-08-10 00:21:14 +02:00
Rokas Puzonas
d6f16b7664
Update usage of 'sinf()' and 'cosf()' to be correct ( #3181 )
...
* Update usage of 'sinf()' and 'cosf()' to be correct
* Update formatting of arithmetic operations
2023-07-19 13:46:14 +02:00
Ray
ceafbcf9d2
REVIEWED: SetShapesTexture()
, allow reseting
2023-06-28 00:37:24 +02:00
Ray
452e3b494c
REVIEWED: GetCollisionRec()
2023-05-10 19:25:12 +02:00
manuel5975p
af4b97a301
Update GetCollisionRec ( #3052 )
...
* Update rshapes.c
Add a much more efficient GetCollisionRec implementation
* Update GetCollisionRec
Replace macros with ternary operators
2023-05-10 19:19:59 +02:00
Ray
7d68aa6869
REVIEWED: Modules description layout
2023-05-01 14:04:22 +02:00
Dan Bechard
2d04dd8b88
Fix off-by-one error in CheckCollisionPointRec ( #3022 )
...
Checking `<= x + w` causes off-by-one error where `CheckCollisionPointRec` will return true at the same time for two rectangles rendered right next to each, but which don't overlap (e.g. when making a 2D tile editor). This is clearly not what was intended.
2023-04-22 10:15:19 +02:00
eternalStudent
8f741d894a
Minor fix in DrawLineBezier* ( #3006 )
...
When `i` starts with `0`, `t` is also `0`, which results in `previous == startPos == current`, this segment is not only redundant, but it also causes division-by-zero since `sqrtf(dx*dx + dy*dy)` is zero.
2023-04-09 22:43:06 +02:00
Julio C. Galindo
6ae21d6581
Fixed some grammar mistakes and typos. ( #2914 )
...
* Fixed some grammar mistakes.
* Fixed some typos.
2023-02-09 13:17:47 +01:00
Ray
1fea266472
Clean trailing spaces
2023-02-05 16:30:23 +01:00
Jeffery Myers
edaca16d7c
Fix warnings in raylib project from MSVC ( #2871 )
2023-01-20 16:05:19 +01:00
Ray
b59fab7ee6
Update year to 2023
2023-01-01 16:00:56 +01:00
nobytesgiven
e5d332dea2
Fix bezier line breaking #2735 ( #2767 )
...
* Fixed bezier line breaking #2735
* converted tabs to spaces
* typo
* Changed doubles to floats
* removed heap allocations\
Co-authored-by: nobytesgiven <nobytesgiven@users.noreply.github.com >
2022-10-24 16:35:47 +02:00
hkc
8ebe62b4dd
Use RL_QUADS/RL_TRIANGLES for single-pixel drawing ( #2750 )
...
Addresses problem mentioned in
https://github.com/raysan5/raylib/issues/2744#issuecomment-1273568263
(in short: when drawing pixels using DrawPixel{,V} in camera mode,
upscaled pixel becomes a line instead of bigger pixel)
2022-10-11 18:45:34 +02:00
Ray
33e7f7cc59
WARNING: DrawLineBezier()
implementation needs review #2721
2022-10-02 11:11:13 +02:00