savage
savage copied to clipboard
Path is now transformable.
Hi @awebneck , I've made paths, sub paths and directions able to be transformed now.
For example
# for path
path = Parser.parse %Q{C211.003,239.997,253.003,197.997,304.003,197.997}
path.scale( 0.5, -0.5 )
path.translate( 0, 100 )
path.to_command
#=> "C105.5015-19.9985 126.5015 1.0015 152.0015 1.0015"
More examples can be found in spec/transformable_spec.rb
.
Some directions are considered "not fully transformable". e.g. HorizontalTo
directions are not directly rotatable. An error will be raised if they are being rotated or skewed.
So two methods , to_transformable_commands!
and fully_transformable?
are added to paths and sub_paths, to help them get transformed.
However, this is transparent to users. Users only need to call transform
, scale
or other methods. Savage turns paths fully transformable before applying transforms.
Could you take a review at this?
Sorry for the calculating mistakes.
I've created another gem savage-transform
@qhwa @awebneck is this project dead?
@mrmeszaros pretty much, yeah - haven't updated the lib in ages, don't have any plans to do in the future.
@awebneck I have no experience in doing releases to rubygems.org
- so if you could add some starting momentum (eg. a README.md
section on the build/release process), I would gladly take the responsibility of maintaining the project.