merged in from code from the other master
[selectricity-live] / vendor / plugins / attachment_fu / vendor / red_artisan / core_image / filters / effects.rb
1 module RedArtisan
2   module CoreImage
3     module Filters
4       module Effects
5         
6         def spotlight(position, points_at, brightness, concentration, color)
7           create_core_image_context(@original.extent.size.width, @original.extent.size.height)
8           
9           @original.spot_light :inputLightPosition => vector3(*position), :inputLightPointsAt => vector3(*points_at), 
10                                :inputBrightness => brightness, :inputConcentration => concentration, :inputColor => color do |spot|
11             @target = spot
12           end
13         end
14         
15         def edges(intensity = 1.00)
16           create_core_image_context(@original.extent.size.width, @original.extent.size.height)
17           
18           @original.edges :inputIntensity => intensity do |edged|
19             @target = edged
20           end
21         end
22         
23         private
24         
25           def vector3(x, y, w)
26             OSX::CIVector.vectorWithX_Y_Z(x, y, w)
27           end
28       end
29     end
30   end
31 end

Benjamin Mako Hill || Want to submit a patch?