savage icon indicating copy to clipboard operation
savage copied to clipboard

Path is now transformable.

Open qhwa opened this issue 10 years ago • 5 comments

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?

qhwa avatar Mar 19 '14 02:03 qhwa

Sorry for the calculating mistakes.

qhwa avatar Mar 19 '14 06:03 qhwa

I've created another gem savage-transform

qhwa avatar May 21 '14 03:05 qhwa

@qhwa @awebneck is this project dead?

mrmeszaros avatar Dec 26 '17 22:12 mrmeszaros

@mrmeszaros pretty much, yeah - haven't updated the lib in ages, don't have any plans to do in the future.

awebneck avatar Dec 26 '17 22:12 awebneck

@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.

mrmeszaros avatar Dec 27 '17 12:12 mrmeszaros