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
apply transforms to Path pata #33
Comments
Joining (chaining) paths seems to be a very simple task, but applying tricky transforms like Maybe I'll do it step by step. |
https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.core.js#L294 Seems, Raphael has matrix transformation mapping. |
I got it! Thank you. |
It works! Example https://github.com/fontello/font-builder/blob/1e8af5db26708777ae8d6cd4407b7c2dc6f463ea/lib/font-dump-phantom.js#L99 (from our font dumper tool). Important!!! Current Raphael release has serious bug DmitryBaranovskiy/raphael#629 . It breaks paths, but can be fixed. That's working code fontello/font-builder@b470a52 (a bit dirty, but tested) Finally, i can confirm, that transformation math not only exists, but also can be extracted and used :) |
http://www.ia.hiof.no/~borres/cgraph/math/twod/p-twod.html will be ready soon ;) |
sorry for a long delay :) |
there is a big problem with some transformations applying and for example if we are trying to replace:
with the:
then 10px stroke is not distorted. also i'm not sure if it possible to convert so Path with strokes will be ignored. |
IMHO it would be more correct to leave path, but rip stroke attributes. |
This optimization is useful, if you like to generate SVG fonts without FontForge. Source image can have multiple paths + transformation rules. Result should be a single path. What needed:
Example:
Also, it would be nice to know how to calculate path bounding box (that's useful, if you like to crop or center image)
The text was updated successfully, but these errors were encountered: