-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[shapes] Add shapes_rectangle_advanced
example implementing a DrawRectangleRoundedGradientH
function
#4435
Conversation
@evertonse Thanks for the improvement but I'm afraid I'm not adding this function to raylib API, users with that level of requirement should implement the function on their end instead. There are too many possibilities for a rectangle to cover all requirements:
A function to cover all those possibilities would require too many parameters and to keep adding more and more functions, I don't think it is the best approach for raylib. But, you can provide a |
DrawRectangleRoundedGradientH
functionshapes_rectangle_advanced
example implementing a DrawRectangleRoundedGradientH
function
Thank you for the quick response, Raysan. I've done just that and updated the PR to accommodate it (update the numbers of examples on README, and makefiles). Let me know if you need any further adjustments. Can I ask something? Would you be willing to accept a PR for getting an image from the clipboard that only works for Windows? I have implemented something like this: // The user would have to call free on the pointer if the clipboard is not an image; it returns NULL.
char* pixels = GetClipboardImage(&width, &height, &data_size);
img = LoadImageFromMemory(".bmp", pixels, data_size); I can easily change it into this: Image image = GetClipboardImage(); The problem is that I don't have enough knowledge to make it work on X11 or Wayland, just for Windows. I also don't know the philosophy of the raylib project regarding having a function that only works for a single platform. I was thinking that maybe someone else could implement it for more platforms in an incremental way. |
@evertonse Thank you very much for the review and all the work put on it! Sorry for not mentioning it earlier but would you mind making the example be 800x450 resolution, all raylib examples follow that same size to better fit in the web. About the Probably the function should be In any case, feel free to send a PR for further review. |
@evertonse thank you very much for this great example! 😄 |
…wRectangleRoundedGradientH` function (raysan5#4435) * [rshapes] Add function * "[shapes] rectangle advanced: fix screen width and height to fit with other examples"
Edit: Add the
shapes_rectangle_advanced
examples that implementsDrawRectangleRoundedGradientH
as sugested.Show Case:
Tried to follow all convetions I could find for implementing an example.