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

Painter::transform #25649

Open
OliverLetterer opened this issue Jan 14, 2025 · 4 comments
Open

Painter::transform #25649

OliverLetterer opened this issue Jan 14, 2025 · 4 comments

Comments

@OliverLetterer
Copy link

Hello,

I was just going through LibGfx, your userland graphics library, there is no Painter::transform(Gfx::AffineTransform const&).

@MacDue
Copy link
Member

MacDue commented Jan 16, 2025

A lot of the painting APIs would not work well with arbitrary transforms (since many are designed for painting simple 90s UIs).

If you need something more fancy with transforms you can use Gfx::Paths which can make arbitrary shapes that can be transformed and stroked or filled with colors or patterns (gradients etc).

@MacDue
Copy link
Member

MacDue commented Jan 17, 2025

I'd be against trying to hack Painter::transform(Gfx::AffineTransform const&) to work with the existing painter; it's just not designed for it. Making a new type of painter (built with Gfx::Path) that supports arbitrary transforms would be cool. I had some ideas for that a while ago: https://gist.github.com/MacDue/2b2c74c3c62d97969d6ef195e8750923 (but I never completed it).

@OliverLetterer
Copy link
Author

Image

@MacDue
Copy link
Member

MacDue commented Jan 17, 2025

That's a hand drawn icon

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

2 participants