Module: PSD::Layer::PathComponents
- Included in:
- PSD::Layer
- Defined in:
- lib/psd/layer/path_components.rb
Instance Method Summary collapse
-
#scale_path_components(xr, yr) ⇒ Object
Attempt to scale the path components within this layer.
-
#translate(x = 0, y = 0) ⇒ Object
Attempt to translate this layer and modify the document.
Instance Method Details
#scale_path_components(xr, yr) ⇒ Object
Attempt to scale the path components within this layer.
15 16 17 18 19 |
# File 'lib/psd/layer/path_components.rb', line 15 def scale_path_components(xr, yr) return unless @path_components @path_components.each{ |p| p.scale(xr, yr) } end |
#translate(x = 0, y = 0) ⇒ Object
Attempt to translate this layer and modify the document.
5 6 7 8 9 10 11 12 |
# File 'lib/psd/layer/path_components.rb', line 5 def translate(x=0, y=0) @left += x @right += x @top += y @bottom += y @path_components.each{ |p| p.translate(x,y) } if @path_components end |