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

Simple Question) Is this can be used for normal drawing by PIL? #13

Closed
mic-user opened this issue Jan 16, 2024 · 4 comments
Closed

Simple Question) Is this can be used for normal drawing by PIL? #13

mic-user opened this issue Jan 16, 2024 · 4 comments

Comments

@mic-user
Copy link

Hi.
It is nice package. Thanks.
Is this can be used for normal drawing by PIL for nomal drawing purpose without plt?

@tomicapretto
Copy link
Owner

Hi @Mitchell-kw-Lee, thanks for the kind words. There are some lower-level components that are not tied to Matplotlib (i.e. everything here https://github.com/tomicapretto/flexitext/tree/main/flexitext/parser). But, ultimately, the library assumes you want to use Matplotlib to create your visualizations.

@mic-user
Copy link
Author

mic-user commented Jan 23, 2024

@tomicapretto Thanks for the guide.
Erm...then,
If I do the code pseudo snipet as below, can be use as I want overally?

import PIL

image = Image.new()
handle = image.draw()
text = "<color:blue, size:16>This is blue text</> and this is regular text"
flexitext(handle, text)

What am I missing?
How to interface PIL image object and flexitext, could you show me the overall INTERFACING way to archive the goal?

@tomicapretto
Copy link
Owner

Unfortunately, that's not going to work, and I think it would require a non-trivial amount of work to make flexitext support a PIL backend as things are written using features of Matplotlib.

@mic-user
Copy link
Author

@tomicapretto
Thanks to know. Have a good day.

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