Sha256: 5ff90184b26799402066df687f44756dfab0a3ea0e090941898080b1c59ad200

Contents?: true

Size: 747 Bytes

Versions: 31

Compression:

Stored size: 747 Bytes

Contents

class PSD
  class Layer
    module Exporting
      # Export the layer to file. May or may not work.
      def export(outfile)
        export_position_and_channels(outfile)

        @blend_mode.write(outfile)
        @file.seek(@blend_mode.num_bytes, IO::SEEK_CUR)

        export_mask_data(outfile)
        export_blending_ranges(outfile)
        export_legacy_layer_name(outfile)
        export_extra_data(outfile)

        outfile.write @file.read(end_of_section - @file.tell)
      end

      def write_vector_mask(outfile)
        outfile.write @file.read(8)
        # outfile.write_int 3
        # outfile.write_int @vector_tag

        @path_components.each{ |pc| pc.write(outfile); @file.seek(26, IO::SEEK_CUR) }
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

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