-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Feature Request: Optional rounded corner in RectangularPolygon #9
Comments
Also really want something like this! |
Any progress on this? Or is there a workaround for drawing rectangles with rounded corners someone can point me to? |
@JackSteel97 you can use this code to produce a rounded rectanle path: Then use one of the overloads in |
@antonfirsov This provides no options for positioning the new rectangle and no option to fill the rectangle either?? |
Positioning the new rectangleYou can transform Fill the rectangleSorry second link was wrong in my previous comment. You can use |
@antonfirsov could you please explain how to make those corners transparent? I need to draw one image atop of another and it should have rounded corners. The only result that I can achieve using example above is colored corners. If Color.Transparent is provided they are not visible at all (obviously). Is there a way to use those corners as a mask and hide parts of image that they overlap? |
Here is method that converts a Personally, I feel that implementing this as a user is straightforward enough, and this functionality needn't be baked into the core library.
|
In today's UI design, the code for rounded rectangles is evident everywhere, omnipresent. I believe that a good core framework indeed needs to embed such codes that, despite appearing particularly simplistic or even foolish, are widely used. Though simple, their widespread usage is undeniable. |
Why are you shouting? |
I'm merely stating the facts objectively. If you feel offended by what I said, I'm sorry |
It is indeed my issue, as the need to submit various styles can easily disrupt the layout, leading to some misunderstandings. In fact, my text is translated using translation software. I do not have an aggressive demeanor. Most of the time, what I state are things I already know. There are matters that I think could be handled more smoothly and flexibly, and I often consult others for advice, rather than instructing them on what to do. At this point, any answers or opinions given to me are reasonable. I apologize to you once again |
All good! I was very confused! 🤣 if someone has the time to provide a PR with tests let’s add the feature. |
Though this would work on images https://github.com/SixLabors/Samples/blob/master/ImageSharp/AvatarWithRoundedCorner/Program.cs this is not possible in Shapes where you need to use Pen (all paths should be closed). See attached sample
It might be a good idea to add an optional parameter in RectangularPolygon constructor to have a radius value of the rounded corner. Thank You.
The text was updated successfully, but these errors were encountered: