Sha256: f9cfdeaef0d4245df3534989964608ed0cc1f032fa1e5caf4dc4264125f3176a

Contents?: true

Size: 949 Bytes

Versions: 68

Compression:

Stored size: 949 Bytes

Contents

module RedArtisan
  module CoreImage
    module Filters
      module Effects

        def spotlight(position, points_at, brightness, concentration, color)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)

          @original.spot_light :inputLightPosition => vector3(*position), :inputLightPointsAt => vector3(*points_at),
                               :inputBrightness => brightness, :inputConcentration => concentration, :inputColor => color do |spot|
            @target = spot
          end
        end

        def edges(intensity = 1.00)
          create_core_image_context(@original.extent.size.width, @original.extent.size.height)

          @original.edges :inputIntensity => intensity do |edged|
            @target = edged
          end
        end

        private

          def vector3(x, y, w)
            OSX::CIVector.vectorWithX_Y_Z(x, y, w)
          end
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
refinerycms-0.9.6.9 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.8 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.7 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.6 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.5 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.4 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.3 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.2 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6.1 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.6 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.31 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.30 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.29 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.28 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.27 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.26 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.25 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.24 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.23 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb
refinerycms-0.9.5.22 vendor/plugins/attachment_fu/vendor/red_artisan/core_image/filters/effects.rb