Sha256: b20cac11e3cd751c72f6b2f9e476538c7a7fe4885152cf004bc7fa5fcdc38fbe

Contents?: true

Size: 533 Bytes

Versions: 31

Compression:

Stored size: 533 Bytes

Contents

class PSD
  class Layer
    module PathComponents
      # Attempt to translate this layer and modify the document.
      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

      # Attempt to scale the path components within this layer.
      def scale_path_components(xr, yr)
        return unless @path_components

        @path_components.each{ |p| p.scale(xr, yr) }
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
psd-3.9.0 lib/psd/layer/path_components.rb
psd-3.8.0 lib/psd/layer/path_components.rb
psd-3.7.0 lib/psd/layer/path_components.rb
psd-3.6.0 lib/psd/layer/path_components.rb
bench9000-0.1 vendor/psd.rb/lib/psd/layer/path_components.rb
psd-3.5.0 lib/psd/layer/path_components.rb
psd-3.4.0 lib/psd/layer/path_components.rb
psd-3.3.3 lib/psd/layer/path_components.rb
psd-3.3.2 lib/psd/layer/path_components.rb
psd-3.3.1 lib/psd/layer/path_components.rb
psd-3.2.4 lib/psd/layer/path_components.rb
psd-3.2.3 lib/psd/layer/path_components.rb
psd-3.2.2 lib/psd/layer/path_components.rb
psd-3.2.1 lib/psd/layer/path_components.rb
psd-3.2.0 lib/psd/layer/path_components.rb
psd-3.1.5 lib/psd/layer/path_components.rb
psd-3.1.4 lib/psd/layer/path_components.rb
psd-3.1.3 lib/psd/layer/path_components.rb
psd-3.1.2 lib/psd/layer/path_components.rb
psd-2.1.2 lib/psd/layer/path_components.rb