You can (as far as I know) scale vector images via image(), like PDF and EPS without pixellation, but don't use scale(). Add the keyword argument width to image() to proportionally scale the image to x pixels wide, give width and height to unproportionally scale to width pixels wide and height pixels hight, and I think you can use values between 1.0 and 0.0 in width and height. See the documentation for a more extensive explanation.
Ah. I actually had done that in a previous sketch that I had forgotten about. But it reminded me of the real reason why I wanted to use SVG over image(): I can set the fill color of paths with SVG.
After reading through the CoreImage documentation, I get the impression that I can use it to shift the color, but CoreImage does not support loading of EPS files. Is there a way to load a grid() of EPS image()s into a canvas layer?
Ah! I finally worked through it and got exactly what I was looking for. Some of the results can be viewed in the NodeBox Flickr group.
I have some ideas for future code modifications, but that will have to wait as I am having too much fun with what it's generating right now.
Zoom() functionality?
Posted by MrDys on Jun 01, 2007I know the various scale() and translate() functions exist, but I was wondering if there was something similar like a zoom() (or a way to emulate it) where the whole image area was scaled uniformly?
Currently, I'm trying to make patterns via grid() (which is fantastically useful by the way) out of vectors in SVG files. If I try to scale() the vectors, the vectors expand, but do not take up more of the image area. I can actually achieve the result I'm looking for if I use an EPS and image(), but whenever I scale it, it pixelates because it's loading via image().
Any ideas/guidance/requests for clarification?