Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Could we have DrawBoxShadows api, or DrawGeometry with BoxShadows parameter? #13251

Closed
dbriard opened this issue Oct 14, 2023 · 1 comment
Closed

Comments

@dbriard
Copy link
Contributor

dbriard commented Oct 14, 2023

It would be very handy to have DrawGeometry with BoxShadows parameter in the same way as DrawRectangle? Or something like DrawBoxShadows (with clipping lile DrawRectangle).

The idea is to be able to draw such geometry without relying on ICutstomDrawOperation like I did:
image

Thanks a lot!

@maxkatz6
Copy link
Member

In Avalonia (and CSS for that matter) box shadows do make sense only with rectangles.
And we already have an API for that:

public void DrawRectangle(IImmutableBrush? brush, ImmutablePen? pen, Rect rect, double radiusX = 0, double radiusY = 0,

This DrawRectangle accepts box shadows argument, and can be used to achieve the same result.

@AvaloniaUI AvaloniaUI locked and limited conversation to collaborators Oct 17, 2023
@maxkatz6 maxkatz6 converted this issue into discussion #13279 Oct 17, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants