public
Description: Host your Google AppEngine apps on your own server.
Homepage: http://appdrop.com
Clone URL: git://github.com/jchris/appdrop.git
100644 32 lines (25 sloc) 1.002 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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