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

Can I use this to tile an image in a fractal pattern? #16

Open
jminardi opened this issue Oct 25, 2018 · 2 comments
Open

Can I use this to tile an image in a fractal pattern? #16

jminardi opened this issue Oct 25, 2018 · 2 comments

Comments

@jminardi
Copy link

I want to start with a base image (my company's logo) and tile it following a fractal pattern (scale, rotate, translate, modify color).

Is that possible?

@undertherain
Copy link
Owner

Short answer: yes you can, but in sort of very undocumented and likely to be changed way.
You need to get cairo context object from pycontextfree, currently it is in pycontextfree._state["ctx"] , and use it to draw an image with cairo API. You can wrap this in contextfree's check_limits etc decorators, they are pretty much agnostic about what is happening inside. I'll try to make some example a but later when I get minute.

@jminardi
Copy link
Author

Awesome, that sounds really useful. I will be on the lookout for an example when you get the time.

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