Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 956 Bytes
module RedArtisan
module CoreImage
module Filters
module Perspective
def perspective(top_left, top_right, bottom_left, bottom_right)
create_core_image_context(@original.extent.size.width, @original.extent.size.height)
@original.perspective_transform :inputTopLeft => top_left, :inputTopRight => top_right, :inputBottomLeft => bottom_left, :inputBottomRight => bottom_right do |transformed|
@target = transformed
end
end
def perspective_tiled(top_left, top_right, bottom_left, bottom_right)
create_core_image_context(@original.extent.size.width, @original.extent.size.height)
@original.perspective_tile :inputTopLeft => top_left, :inputTopRight => top_right, :inputBottomLeft => bottom_left, :inputBottomRight => bottom_right do |tiled|
@target = tiled
end
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.