Sha256: ecb9fb421154698d256e52eae83abdfe5df7abde17a602a8ce8762e54d3b8c8b

Contents?: true

Size: 372 Bytes

Versions: 9

Compression:

Stored size: 372 Bytes

Contents

require 'psd'
require 'psd_native/psd_native'

class PSD
  module Compose
    PSDNative::Compose.methods(false).each do |meth|
      define_method(meth) do |*args|
        do_blend meth, *args
      end
    end

    private

    def do_blend(blend, fg, bg, opts={})
      opts = DEFAULT_OPTS.merge(opts)
      PSDNative::Compose.send(blend, fg, bg, opts)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
bench9000-0.1 vendor/psd_native/lib/psd_native/compose.rb
psd_native-1.1.3 lib/psd_native/compose.rb
psd_native-1.1.2 lib/psd_native/compose.rb
psd_native-1.1.1 lib/psd_native/compose.rb
psd_native-1.1.0 lib/psd_native/compose.rb
psd_native-1.0.1 lib/psd_native/compose.rb
psd_native-1.0.0 lib/psd_native/compose.rb
psd_native-0.6.0 lib/psd_native/compose.rb
psd_native-0.5.0 lib/psd_native/compose.rb