Skip to content
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

border-radius #886

Open
omersahinesk opened this issue May 6, 2024 · 3 comments
Open

border-radius #886

omersahinesk opened this issue May 6, 2024 · 3 comments

Comments

@omersahinesk
Copy link

First of all QuestPdf is awesome.
But i need to rounded borders.

Could you add border-radius styling for borders.

container
.Border(1)
.BorderRadius(30F);

@PrashantUnity
Copy link

PrashantUnity commented May 15, 2024

You can use SkiaSharp To Implement such features

Documentation here
https://www.questpdf.com/concepts/skia-sharp-integration.html

@omersahinesk
Copy link
Author

Thanks dude,
But adding border-radius have to more simple :)
I will add PR for this issue, when i will have free time

You can use SkiaSharp To Implement such features

Documentation here https://www.questpdf.com/concepts/skia-sharp-integration.html

@MarcinZiabek
Copy link
Member

MarcinZiabek commented May 20, 2024

Thank you so much for sharing this feedback ❤️

I completely agree that QuestPDF should provide more ways to implement complex graphics. Rounded corners are a minimum.

Would you like to brainstorm the necessary features and their complexity with me?

  • How could the API look?
  • What do you need?
  • What features are essential, and what are only not-really-useful corner cases?
  • CSS is surely a source of inspiration. But do we need all the features?

A couple of things I would like to consider:

  1. Option to set the border radius for all corners vs for each corner separately (different radiuses per corner)
  2. How to handle border thickness with rounded corners, taking into account that borders may have various thicknesses already
  3. How to handle various border colors?
  4. Should we support gradients? If yes, how complex?

By the way, there is an alternative to using SkiaSharp. Instead of using SkCanvas, you can generate an SVG image. This way, you don't need to introduce additional dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants