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

swiftGD.Image isn't able to draw a tilted/rotated rectangle #27

Open
vitalz opened this issue Jun 28, 2020 · 4 comments
Open

swiftGD.Image isn't able to draw a tilted/rotated rectangle #27

vitalz opened this issue Jun 28, 2020 · 4 comments

Comments

@vitalz
Copy link

vitalz commented Jun 28, 2020

swiftGD.Image isn't able to draw a titled/rotated rectangle (both 'stroke' and filled)

@vitalz
Copy link
Author

vitalz commented Jun 28, 2020

It looks libgd doesn't have such ability itself but SwiftGD is a bridge and could add such feature out of box. Otherwise another options (graph libs) adapted to Swift have to be figured out.

@deirdresm
Copy link

The old school way to do this is simply to draw the filled rectangle, then draw the bordered (no fill) rectangle on top. Given that libgd is a very lightweight old school library, that's how I'd accomplish the task.

@mcritz
Copy link
Contributor

mcritz commented Apr 14, 2021

@vitalz I wouldn’t expect SwiftGD to do this out of the box. It’s more of a direct port of gd and should behave like gd does.

Of course, you could write your own methods to accomplish what you’re after.

@vitalz
Copy link
Author

vitalz commented Apr 26, 2021

The old school way to do this is simply to draw the filled rectangle, then draw the bordered (no fill) rectangle on top. Given that libgd is a very lightweight old school library, that's how I'd accomplish the task.

By tilted I meant a rotated rectangle. Wrongly used titled.

@vitalz vitalz changed the title swiftGD.Image isn't able to draw a titled rectangle swiftGD.Image isn't able to draw a tilted/rotated rectangle Apr 26, 2021
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