Class: CIFilter

Inherits:
Object show all
Defined in:
lib/ios/sugarcube-image/cifilter.rb

Overview

The following filters are available in iOS:

  • CIAdditionCompositing * CIExposureAdjust * CIPerspectiveTile

  • CIAffineClamp * CIFalseColor * CIPerspectiveTransform

  • CIAffineTile * CIFlashTransition * CIPerspectiveTransformWithExtent

  • CIAffineTransform * CIFourfoldReflectedTile * CIPinchDistortion

  • CIBarsSwipeTransition * CIFourfoldRotatedTile * CIPixellate

  • CIBlendWithMask * CIFourfoldTranslatedTile * CIRadialGradient

  • CIBloom * CIGammaAdjust * CIFilter

  • CIBumpDistortion * CIGaussianBlur * CISaturationBlendMode

  • CIBumpDistortionLinear * CIGaussianGradient * CIScreenBlendMode

  • CICheckerboardGenerator * CIGlideReflectedTile * CISepiaTone

  • CICircleSplashDistortion * CIGloom * CISharpenLuminance

  • CICircularScreen * CIHardLightBlendMode * CISixfoldReflectedTile

  • CIColorBlendMode * CIHatchedScreen * CISixfoldRotatedTile

  • CIColorBurnBlendMode * CIHighlightShadowAdjust * CISoftLightBlendMode

  • CIColorControls * CIHoleDistortion * CISourceAtopCompositing

  • CIColorCube * CIHueAdjust * CISourceInCompositing

  • CIColorDodgeBlendMode * CIHueBlendMode * CISourceOutCompositing

  • CIFilter * CILanczosScaleTransform * CISourceOverCompositing

  • CIColorMap * CILightenBlendMode * CIStarShineGenerator

  • CIColorMatrix * CILightTunnel * CIStraightenFilter

  • CIColorMonochrome * CILinearGradient * CIStripesGenerator

  • CIColorPosterize * CILineScreen * CISwipeTransition

  • CIConstantColorGenerator * CILuminosityBlendMode * CITemperatureAndTint

  • CICopyMachineTransition * CIFilter * CIToneCurve

  • CICrop * CIFilter * CITriangleKaleidoscope

  • CIDarkenBlendMode * CIMaximumCompositing * CITwelvefoldReflectedTile

  • CIDifferenceBlendMode * CIFilter * CITwirlDistortion

  • CIDisintegrateWithMaskTransition * CIMinimumCompositing * CIUnsharpMask

  • CIDissolveTransition * CIModTransition * CIVibrance

  • CIDotScreen * CIMultiplyBlendMode * CIVignette

  • CIEightfoldReflectedTile * CIMultiplyCompositing * CIVortexDistortion

  • CIExclusionBlendMode * CIOverlayBlendMode * CIWhitePointAdjust

The following filters have not been added to iOS: (as of 6/19/2013)

  • CIAreaAverage * CIHexagonalPixellate

  • CIAreaHistogram * CIKaleidoscope

  • CIAreaMaximum * CILenticularHaloGenerator

  • CIAreaMaximumAlpha * CILineOverlay

  • CIAreaMinimum * CIMedianFilter

  • CIAreaMinimumAlpha * CIMotionBlur

  • CIBoxBlur * CINoiseReduction

  • CICircularWrap * CIOpTile

  • CICMYKHalftone * CIPageCurlTransition

  • CIColumnAverage * CIParallelogramTile

  • CIComicEffect * CIPointillize

  • CICrystallize * CIRippleTransition

  • CIDepthOfField * CIRowAverage

  • CIDiscBlur * CIShadedMaterial

  • CIDisplacementDistortion * CISpotColor

  • CIDroste * CISpotLight

  • CIEdges * CIStretchCrop

  • CIEdgeWork * CISunbeamsGenerator

  • CIGlassDistortion * CITorusLensDistortion

  • CIGlassLozenge * CITriangleTile

  • CIHeightFieldFromMask * CIZoomBlur

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._create_filter(filter_name, args, set_args = [], names = {}) ⇒ Object

This helper instantiates the filter (raising an exception if it was unsuccessful) and applies all the arguments from options (naming the args according to ‘set_args`), translating names from `names`



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/ios/sugarcube-image/cifilter.rb', line 83

def _create_filter(filter_name, args, set_args=[], names={})
  filter = CIFilter.filterWithName(filter_name)
  raise "Unsupported filter #{filter_name.inspect}" unless filter

  # turn a list of arguments into a hash
  if args.length == 1 && Hash === args[0]
    options = args[0]
  else
    options = {}
    args.each_with_index do |arg, index|
      setter = set_args[index]
      raise "Cannot set option ##{index}" if setter.nil?
      options[setter] = arg
    end
  end

  options.each do |key, value|
    # translate the keys, but if there is no translation key then try to
    # assign the key as the user specified. This means you can pass options
    # like `'inputRadius'` directly, without using an alias
    key = names[key] || key.to_s

    # translate the value if a block was given for that. `key` is always going
    # to be the CIImage key (not the alias, e.g. :radius => 'inputRadius')
    value = yield(key, value) if block_given?
    filter.setValue(value, forKey:key)
  end
  return filter
end

.addition_compositing(*options) ⇒ Object

CIAdditionCompositing



114
115
116
# File 'lib/ios/sugarcube-image/cifilter.rb', line 114

def addition_compositing(*options)
  return _create_filter('CIAdditionCompositing', options, [:background], background: 'inputBackgroundImage')
end

.affine_clamp(*options) ⇒ Object

CIAffineClamp



119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/ios/sugarcube-image/cifilter.rb', line 119

def affine_clamp(*options)
  return _create_filter('CIAffineClamp', options, [:transform], transform: 'inputTransform'
    ) do |key, value|
    if key == 'inputTransform' && CGAffineTransform === value
      ptr = Pointer.new(:id)
      ptr[0] = value
      NSValue.valueWithBytes(ptr, objCType:CGAffineTransform.type)
    else
      value
    end
  end
end

.affine_tile(*options) ⇒ Object

CIAffineTile



133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/ios/sugarcube-image/cifilter.rb', line 133

def affine_tile(*options)
  return _create_filter('CIAffineTile', options, [:transform], transform: 'inputTransform'
    ) do |key, value|
    if key == 'inputTransform' && CGAffineTransform === value
      ptr = Pointer.new(:id)
      ptr[0] = value
      NSValue.valueWithBytes(ptr, objCType:CGAffineTransform.type)
    else
      value
    end
  end
end

.affine_transform(*options) ⇒ Object

CIAffineTransform



147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/ios/sugarcube-image/cifilter.rb', line 147

def affine_transform(*options)
  return _create_filter('CIAffineTransform', options, [:transform], transform: 'inputTransform'
    ) do |key, value|
    if key == 'inputTransform' && CGAffineTransform === value
      ptr = Pointer.new(:id)
      ptr[0] = value
      NSValue.valueWithBytes(ptr, objCType:CGAffineTransform.type)
    else
      value
    end
  end
end

.bars_swipe_transition(*options) ⇒ Object

CIBarsSwipeTransition



161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/ios/sugarcube-image/cifilter.rb', line 161

def bars_swipe_transition(*options)
  return _create_filter('CIBarsSwipeTransition', options, [:target, :time],
    target: 'inputTargetImage', angle: 'inputAngle', width: 'inputWidth',
    offset: 'inputBarOffset', time: 'inputTime'
    ) do |key, value|
    if key == 'inputTargetImage'
      value.ciimage
    else
      value
    end
  end
end

.blend_with_mask(*options) ⇒ Object

CIBlendWithMask



175
176
177
178
179
180
# File 'lib/ios/sugarcube-image/cifilter.rb', line 175

def blend_with_mask(*options)
  return _create_filter('CIBlendWithMask', options, [:background, :mask], background: 'inputBackgroundImage', mask: 'inputMaskImage'
    ) do |key, value|
    value.ciimage
  end
end

.bloom(*options) ⇒ Object

CIBloom



183
184
185
# File 'lib/ios/sugarcube-image/cifilter.rb', line 183

def bloom(*options)
  return _create_filter('CIBloom', options, [:radius, :intensity], radius: 'inputRadius', intensity: 'inputIntensity')
end

.bump_distortion(*options) ⇒ Object

CIBumpDistortion

PENDING


189
190
191
# File 'lib/ios/sugarcube-image/cifilter.rb', line 189

def bump_distortion(*options)
  return _create_filter('CIBumpDistortion', options)
end

.bump_distortion_linear(*options) ⇒ Object

CIBumpDistortionLinear

PENDING


195
196
197
# File 'lib/ios/sugarcube-image/cifilter.rb', line 195

def bump_distortion_linear(*options)
  return _create_filter('CIBumpDistortionLinear', options)
end

.checkerboard_generator(*options) ⇒ Object

CICheckerboardGenerator



200
201
202
203
204
205
206
207
208
209
210
# File 'lib/ios/sugarcube-image/cifilter.rb', line 200

def checkerboard_generator(*options)
  return _create_filter('CICheckerboardGenerator', options, [:width, :color0, :color1],
    width: 'inputWidth', color0: 'inputColor0', color1: 'inputColor1', sharpness: 'inputSharpness'
    ) do |key, value|
    if key == 'inputColor0' || key == 'inputColor1'
      value.cicolor
    else
      value
    end
  end
end

.circle_splash_distortion(*options) ⇒ Object

CICircleSplashDistortion



213
214
215
216
217
218
219
220
221
222
223
# File 'lib/ios/sugarcube-image/cifilter.rb', line 213

def circle_splash_distortion(*options)
  return _create_filter('CICircleSplashDistortion', options, [:radius, :center],
    radius: 'inputRadius', center: 'inputCenter'
    ) do |key, value|
    if key == 'inputCenter' && ! CIVector === value
      CIVector.vectorWithX(value[0], Y: value[1])
    else
      value
    end
  end
end

.circular_screen(*options) ⇒ Object

CICircularScreen

PENDING


227
228
229
# File 'lib/ios/sugarcube-image/cifilter.rb', line 227

def circular_screen(*options)
  return _create_filter('CICircularScreen', options)
end

.color_blend_mode(*options) ⇒ Object

CIColorBlendMode



232
233
234
235
236
237
# File 'lib/ios/sugarcube-image/cifilter.rb', line 232

def color_blend_mode(*options)
  return _create_filter('CIColorBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.color_burn_blend_mode(*options) ⇒ Object

CIColorBurnBlendMode



240
241
242
243
244
245
# File 'lib/ios/sugarcube-image/cifilter.rb', line 240

def color_burn_blend_mode(*options)
  return _create_filter('CIColorBurnBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.color_controls(*options) ⇒ Object

CIColorControls



248
249
250
251
# File 'lib/ios/sugarcube-image/cifilter.rb', line 248

def color_controls(*options)
  return _create_filter('CIColorControls', options, [:saturation, :brightness, :contrast],
    saturation: 'inputSaturation', brightness: 'inputBrightness', contrast: 'inputContrast')
end

.color_cube(*options) ⇒ Object

CIColorCube

PENDING


255
256
257
# File 'lib/ios/sugarcube-image/cifilter.rb', line 255

def color_cube(*options)
  return _create_filter('CIColorCube', options)
end

.color_dodge_blend_mode(*options) ⇒ Object

CIColorDodgeBlendMode



260
261
262
263
264
265
# File 'lib/ios/sugarcube-image/cifilter.rb', line 260

def color_dodge_blend_mode(*options)
  return _create_filter('CIColorDodgeBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.color_invertObject

CIColorInvert



268
269
270
# File 'lib/ios/sugarcube-image/cifilter.rb', line 268

def color_invert()
  return CIFilter.filterWithName('CIColorInvert')
end

.color_map(*options) ⇒ Object

CIColorMap



273
274
275
276
277
278
# File 'lib/ios/sugarcube-image/cifilter.rb', line 273

def color_map(*options)
  return _create_filter('CIColorMap', options, [:gradient], gradient: 'inputGradientImage'
    ) do |key, value|
    value.ciimage
  end
end

.color_matrix(*options) ⇒ Object

CIColorMatrix

PENDING


282
283
284
# File 'lib/ios/sugarcube-image/cifilter.rb', line 282

def color_matrix(*options)
  return _create_filter('CIColorMatrix', options)
end

.color_monochrome(*options) ⇒ Object

CIColorMonochrome

PENDING


288
289
290
# File 'lib/ios/sugarcube-image/cifilter.rb', line 288

def color_monochrome(*options)
  return _create_filter('CIColorMonochrome', options)
end

.color_posterize(*options) ⇒ Object

CIColorPosterize



293
294
295
# File 'lib/ios/sugarcube-image/cifilter.rb', line 293

def color_posterize(*options)
  return _create_filter('CIColorPosterize', options, [:levels], levels: 'inputLevels')
end

.constant_color_generator(*options) ⇒ Object

CIConstantColorGenerator



298
299
300
301
302
303
# File 'lib/ios/sugarcube-image/cifilter.rb', line 298

def constant_color_generator(*options)
  return _create_filter('CIConstantColorGenerator', options, [:color], color: 'inputColor'
    ) do |key, value|
    value.cicolor
  end
end

.copy_machine_transition(*options) ⇒ Object

CICopyMachineTransition

PENDING


307
308
309
# File 'lib/ios/sugarcube-image/cifilter.rb', line 307

def copy_machine_transition(*options)
  return _create_filter('CICopyMachineTransition', options)
end

.crop(*options) ⇒ Object

CICrop



312
313
314
315
316
317
318
319
320
# File 'lib/ios/sugarcube-image/cifilter.rb', line 312

def crop(*options)
  return _create_filter('CICrop', options, [:rectangle], rectangle: 'inputRectangle') do |key, value|
    rect = SugarCube::CoreGraphics::Rect(value)
    CIVector.alloc.initWithX( rect.origin.x,
                           Y: rect.origin.y,
                           Z: rect.size.width,
                           W: rect.size.height)
  end
end

.darken_blend_mode(*options) ⇒ Object

CIDarkenBlendMode



323
324
325
326
327
328
# File 'lib/ios/sugarcube-image/cifilter.rb', line 323

def darken_blend_mode(*options)
  return _create_filter('CIDarkenBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.difference_blend_mode(*options) ⇒ Object

CIDifferenceBlendMode



331
332
333
334
335
336
# File 'lib/ios/sugarcube-image/cifilter.rb', line 331

def difference_blend_mode(*options)
  return _create_filter('CIDifferenceBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.disintegrate_with_mask_transition(*options) ⇒ Object

CIDisintegrateWithMaskTransition

PENDING


340
341
342
# File 'lib/ios/sugarcube-image/cifilter.rb', line 340

def disintegrate_with_mask_transition(*options)
  return _create_filter('CIDisintegrateWithMaskTransition', options)
end

.dissolve_transition(*options) ⇒ Object

CIDissolveTransition

PENDING


346
347
348
# File 'lib/ios/sugarcube-image/cifilter.rb', line 346

def dissolve_transition(*options)
  return _create_filter('CIDissolveTransition', options)
end

.dot_screen(*options) ⇒ Object

CIDotScreen

PENDING


352
353
354
# File 'lib/ios/sugarcube-image/cifilter.rb', line 352

def dot_screen(*options)
  return _create_filter('CIDotScreen', options)
end

.eightfold_reflected_tile(*options) ⇒ Object

CIEightfoldReflectedTile

PENDING


358
359
360
# File 'lib/ios/sugarcube-image/cifilter.rb', line 358

def eightfold_reflected_tile(*options)
  return _create_filter('CIEightfoldReflectedTile', options)
end

.exclusion_blend_mode(*options) ⇒ Object

CIExclusionBlendMode



363
364
365
366
367
368
# File 'lib/ios/sugarcube-image/cifilter.rb', line 363

def exclusion_blend_mode(*options)
  return _create_filter('CIExclusionBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.exposure_adjust(*options) ⇒ Object

CIExposureAdjust



371
372
373
# File 'lib/ios/sugarcube-image/cifilter.rb', line 371

def exposure_adjust(*options)
  return _create_filter('CIExposureAdjust', options, [:ev], ev: 'inputEV')
end

.false_color(*options) ⇒ Object

CIFalseColor



376
377
378
379
380
381
# File 'lib/ios/sugarcube-image/cifilter.rb', line 376

def false_color(*options)
  return _create_filter('CIFalseColor', options, [:color0, :color1], color0: 'inputColor0', color1: 'inputColor1'
    ) do |key, value|
    value.cicolor
  end
end

.flash_transition(*options) ⇒ Object

CIFlashTransition

PENDING


385
386
387
# File 'lib/ios/sugarcube-image/cifilter.rb', line 385

def flash_transition(*options)
  return _create_filter('CIFlashTransition', options)
end

.fourfold_reflected_tile(*options) ⇒ Object

CIFourfoldReflectedTile

PENDING


391
392
393
# File 'lib/ios/sugarcube-image/cifilter.rb', line 391

def fourfold_reflected_tile(*options)
  return _create_filter('CIFourfoldReflectedTile', options)
end

.fourfold_rotated_tile(*options) ⇒ Object

CIFourfoldRotatedTile

PENDING


397
398
399
# File 'lib/ios/sugarcube-image/cifilter.rb', line 397

def fourfold_rotated_tile(*options)
  return _create_filter('CIFourfoldRotatedTile', options)
end

.fourfold_translated_tile(*options) ⇒ Object

CIFourfoldTranslatedTile

PENDING


403
404
405
# File 'lib/ios/sugarcube-image/cifilter.rb', line 403

def fourfold_translated_tile(*options)
  return _create_filter('CIFourfoldTranslatedTile', options)
end

.gamma_adjust(*options) ⇒ Object

CIGammaAdjust



408
409
410
# File 'lib/ios/sugarcube-image/cifilter.rb', line 408

def gamma_adjust(*options)
  return _create_filter('CIGammaAdjust', options, [:power], power: 'inputPower')
end

.gaussian_blur(*options) ⇒ Object

CIGaussianBlur



413
414
415
# File 'lib/ios/sugarcube-image/cifilter.rb', line 413

def gaussian_blur(*options)
  return _create_filter('CIGaussianBlur', options, [:radius], radius: 'inputRadius')
end

.gaussian_gradient(*options) ⇒ Object

CIGaussianGradient

PENDING


419
420
421
# File 'lib/ios/sugarcube-image/cifilter.rb', line 419

def gaussian_gradient(*options)
  return _create_filter('CIGaussianGradient', options)
end

.glide_reflected_tile(*options) ⇒ Object

CIGlideReflectedTile

PENDING


425
426
427
# File 'lib/ios/sugarcube-image/cifilter.rb', line 425

def glide_reflected_tile(*options)
  return _create_filter('CIGlideReflectedTile', options)
end

.gloom(*options) ⇒ Object

CIGloom



430
431
432
# File 'lib/ios/sugarcube-image/cifilter.rb', line 430

def gloom(*options)
  return _create_filter('CIGloom', options, [:intensity, :radius], intensity: 'inputIntensity', radius: 'inputRadius')
end

.hard_light_blend_mode(*options) ⇒ Object

CIHardLightBlendMode



435
436
437
438
439
440
# File 'lib/ios/sugarcube-image/cifilter.rb', line 435

def hard_light_blend_mode(*options)
  return _create_filter('CIHardLightBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.hatched_screen(*options) ⇒ Object

CIHatchedScreen

PENDING


444
445
446
# File 'lib/ios/sugarcube-image/cifilter.rb', line 444

def hatched_screen(*options)
  return _create_filter('CIHatchedScreen', options)
end

.highlight_shadow_adjust(*options) ⇒ Object

CIHighlightShadowAdjust



449
450
451
# File 'lib/ios/sugarcube-image/cifilter.rb', line 449

def highlight_shadow_adjust(*options)
  return _create_filter('CIHighlightShadowAdjust', options, [:highlight, :shadow], highlight: 'inputHighlightAmount', shadow: 'inputShadowAmount')
end

.hole_distortion(*options) ⇒ Object

CIHoleDistortion

PENDING


455
456
457
# File 'lib/ios/sugarcube-image/cifilter.rb', line 455

def hole_distortion(*options)
  return _create_filter('CIHoleDistortion', options)
end

.hue_adjust(*options) ⇒ Object

CIHueAdjust



460
461
462
# File 'lib/ios/sugarcube-image/cifilter.rb', line 460

def hue_adjust(*options)
  return _create_filter('CIHueAdjust', options, [:angle], angle: 'inputAngle')
end

.hue_blend_mode(*options) ⇒ Object

CIHueBlendMode



465
466
467
468
469
470
# File 'lib/ios/sugarcube-image/cifilter.rb', line 465

def hue_blend_mode(*options)
  return _create_filter('CIHueBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.lanczos_scale_transform(*options) ⇒ Object

CILanczosScaleTransform



473
474
475
# File 'lib/ios/sugarcube-image/cifilter.rb', line 473

def lanczos_scale_transform(*options)
  return _create_filter('CILanczosScaleTransform', options, [:scale, :aspect_ratio], scale: 'inputScale', aspect_ratio: 'inputAspectRatio')
end

.light_tunnel(*options) ⇒ Object

CILightTunnel

PENDING


487
488
489
# File 'lib/ios/sugarcube-image/cifilter.rb', line 487

def light_tunnel(*options)
  return _create_filter('CILightTunnel', options)
end

.lighten_blend_mode(*options) ⇒ Object

CILightenBlendMode



478
479
480
481
482
483
# File 'lib/ios/sugarcube-image/cifilter.rb', line 478

def lighten_blend_mode(*options)
  return _create_filter('CILightenBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.line_screen(*options) ⇒ Object

CILineScreen

PENDING


499
500
501
# File 'lib/ios/sugarcube-image/cifilter.rb', line 499

def line_screen(*options)
  return _create_filter('CILineScreen', options)
end

.linear_gradient(*options) ⇒ Object

CILinearGradient

PENDING


493
494
495
# File 'lib/ios/sugarcube-image/cifilter.rb', line 493

def linear_gradient(*options)
  return _create_filter('CILinearGradient', options)
end

.luminosity_blend_mode(*options) ⇒ Object

CILuminosityBlendMode



504
505
506
507
508
509
# File 'lib/ios/sugarcube-image/cifilter.rb', line 504

def luminosity_blend_mode(*options)
  return _create_filter('CILuminosityBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.mask_to_alphaObject

CIMaskToAlpha



512
513
514
# File 'lib/ios/sugarcube-image/cifilter.rb', line 512

def mask_to_alpha()
  return CIFilter.filterWithName('CIMaskToAlpha')
end

.maximum_componentObject

CIMaximumComponent



517
518
519
# File 'lib/ios/sugarcube-image/cifilter.rb', line 517

def maximum_component()
  return CIFilter.filterWithName('CIMaximumComponent')
end

.maximum_compositing(*options) ⇒ Object

CIMaximumCompositing



522
523
524
525
526
527
# File 'lib/ios/sugarcube-image/cifilter.rb', line 522

def maximum_compositing(*options)
  return _create_filter('CIMaximumCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.minimum_componentObject

CIMinimumComponent



530
531
532
# File 'lib/ios/sugarcube-image/cifilter.rb', line 530

def minimum_component()
  return CIFilter.filterWithName('CIMinimumComponent')
end

.minimum_compositing(*options) ⇒ Object

CIMinimumCompositing



535
536
537
538
539
540
# File 'lib/ios/sugarcube-image/cifilter.rb', line 535

def minimum_compositing(*options)
  return _create_filter('CIMinimumCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.mod_transition(*options) ⇒ Object

CIModTransition

PENDING


544
545
546
# File 'lib/ios/sugarcube-image/cifilter.rb', line 544

def mod_transition(*options)
  return _create_filter('CIModTransition', options)
end

.multiply_blend_mode(*options) ⇒ Object

CIMultiplyBlendMode



549
550
551
552
553
554
# File 'lib/ios/sugarcube-image/cifilter.rb', line 549

def multiply_blend_mode(*options)
  return _create_filter('CIMultiplyBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.multiply_compositing(*options) ⇒ Object

CIMultiplyCompositing



557
558
559
560
561
562
# File 'lib/ios/sugarcube-image/cifilter.rb', line 557

def multiply_compositing(*options)
  return _create_filter('CIMultiplyCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.overlay_blend_mode(*options) ⇒ Object

CIOverlayBlendMode



565
566
567
568
569
570
# File 'lib/ios/sugarcube-image/cifilter.rb', line 565

def overlay_blend_mode(*options)
  return _create_filter('CIOverlayBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.perspective_tile(*options) ⇒ Object

CIPerspectiveTile

PENDING


574
575
576
# File 'lib/ios/sugarcube-image/cifilter.rb', line 574

def perspective_tile(*options)
  return _create_filter('CIPerspectiveTile', options)
end

.perspective_transform(*options) ⇒ Object

CIPerspectiveTransform

PENDING


580
581
582
# File 'lib/ios/sugarcube-image/cifilter.rb', line 580

def perspective_transform(*options)
  return _create_filter('CIPerspectiveTransform', options)
end

.perspective_transform_with_extent(*options) ⇒ Object

CIPerspectiveTransformWithExtent

PENDING


586
587
588
# File 'lib/ios/sugarcube-image/cifilter.rb', line 586

def perspective_transform_with_extent(*options)
  return _create_filter('CIPerspectiveTransformWithExtent', options)
end

.pinch_distortion(*options) ⇒ Object

CIPinchDistortion

PENDING


592
593
594
# File 'lib/ios/sugarcube-image/cifilter.rb', line 592

def pinch_distortion(*options)
  return _create_filter('CIPinchDistortion', options)
end

.pixellate(*options) ⇒ Object

CIPixellate

PENDING


598
599
600
# File 'lib/ios/sugarcube-image/cifilter.rb', line 598

def pixellate(*options)
  return _create_filter('CIPixellate', options)
end

.radial_gradient(*options) ⇒ Object

CIRadialGradient

PENDING


604
605
606
# File 'lib/ios/sugarcube-image/cifilter.rb', line 604

def radial_gradient(*options)
  return _create_filter('CIRadialGradient', options)
end

.random_generatorObject

CIRandomGenerator



609
610
611
# File 'lib/ios/sugarcube-image/cifilter.rb', line 609

def random_generator()
  return CIFilter.filterWithName('CIRandomGenerator')
end

.saturation_blend_mode(*options) ⇒ Object

CISaturationBlendMode



614
615
616
617
618
619
# File 'lib/ios/sugarcube-image/cifilter.rb', line 614

def saturation_blend_mode(*options)
  return _create_filter('CISaturationBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.screen_blend_mode(*options) ⇒ Object

CIScreenBlendMode



622
623
624
625
626
627
# File 'lib/ios/sugarcube-image/cifilter.rb', line 622

def screen_blend_mode(*options)
  return _create_filter('CIScreenBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.sepia_tone(*options) ⇒ Object

CISepiaTone



630
631
632
# File 'lib/ios/sugarcube-image/cifilter.rb', line 630

def sepia_tone(*options)
  return _create_filter('CISepiaTone', options, [:intensity], intensity: 'inputIntensity')
end

.sharpen_luminance(*options) ⇒ Object

CISharpenLuminance



635
636
637
# File 'lib/ios/sugarcube-image/cifilter.rb', line 635

def sharpen_luminance(*options)
  return _create_filter('CISharpenLuminance', options, [:sharpness], sharpness: 'inputSharpness')
end

.sixfold_reflected_tile(*options) ⇒ Object

CISixfoldReflectedTile

PENDING


641
642
643
# File 'lib/ios/sugarcube-image/cifilter.rb', line 641

def sixfold_reflected_tile(*options)
  return _create_filter('CISixfoldReflectedTile', options)
end

.sixfold_rotated_tile(*options) ⇒ Object

CISixfoldRotatedTile

PENDING


647
648
649
# File 'lib/ios/sugarcube-image/cifilter.rb', line 647

def sixfold_rotated_tile(*options)
  return _create_filter('CISixfoldRotatedTile', options)
end

.soft_light_blend_mode(*options) ⇒ Object

CISoftLightBlendMode



652
653
654
655
656
657
# File 'lib/ios/sugarcube-image/cifilter.rb', line 652

def soft_light_blend_mode(*options)
  return _create_filter('CISoftLightBlendMode', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.source_atop_compositing(*options) ⇒ Object

CISourceAtopCompositing



660
661
662
663
664
665
# File 'lib/ios/sugarcube-image/cifilter.rb', line 660

def source_atop_compositing(*options)
  return _create_filter('CISourceAtopCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.source_in_compositing(*options) ⇒ Object

CISourceInCompositing



668
669
670
671
672
673
# File 'lib/ios/sugarcube-image/cifilter.rb', line 668

def source_in_compositing(*options)
  return _create_filter('CISourceInCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.source_out_compositing(*options) ⇒ Object

CISourceOutCompositing



676
677
678
679
680
681
# File 'lib/ios/sugarcube-image/cifilter.rb', line 676

def source_out_compositing(*options)
  return _create_filter('CISourceOutCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.source_over_compositing(*options) ⇒ Object

CISourceOverCompositing



684
685
686
687
688
689
# File 'lib/ios/sugarcube-image/cifilter.rb', line 684

def source_over_compositing(*options)
  return _create_filter('CISourceOverCompositing', options, [:background], background: 'inputBackgroundImage'
    ) do |key, value|
    value.ciimage
  end
end

.star_shine_generator(*options) ⇒ Object

CIStarShineGenerator

PENDING


693
694
695
# File 'lib/ios/sugarcube-image/cifilter.rb', line 693

def star_shine_generator(*options)
  return _create_filter('CIStarShineGenerator', options)
end

.straighten_filter(*options) ⇒ Object

CIStraightenFilter



698
699
700
# File 'lib/ios/sugarcube-image/cifilter.rb', line 698

def straighten_filter(*options)
  return _create_filter('CIStraightenFilter', options, [:angle], angle: 'inputAngle')
end

.stripes_generator(*options) ⇒ Object

CIStripesGenerator

PENDING


704
705
706
# File 'lib/ios/sugarcube-image/cifilter.rb', line 704

def stripes_generator(*options)
  return _create_filter('CIStripesGenerator', options)
end

.swipe_transition(*options) ⇒ Object

CISwipeTransition

PENDING


710
711
712
# File 'lib/ios/sugarcube-image/cifilter.rb', line 710

def swipe_transition(*options)
  return _create_filter('CISwipeTransition', options)
end

.temperature_and_tint(*options) ⇒ Object

CITemperatureAndTint

PENDING


716
717
718
# File 'lib/ios/sugarcube-image/cifilter.rb', line 716

def temperature_and_tint(*options)
  return _create_filter('CITemperatureAndTint', options)
end

.tone_curve(*options) ⇒ Object

CIToneCurve

PENDING


722
723
724
# File 'lib/ios/sugarcube-image/cifilter.rb', line 722

def tone_curve(*options)
  return _create_filter('CIToneCurve', options)
end

.triangle_kaleidoscope(*options) ⇒ Object

CITriangleKaleidoscope

PENDING


728
729
730
# File 'lib/ios/sugarcube-image/cifilter.rb', line 728

def triangle_kaleidoscope(*options)
  return _create_filter('CITriangleKaleidoscope', options)
end

.twelvefold_reflected_tile(*options) ⇒ Object

CITwelvefoldReflectedTile

PENDING


734
735
736
# File 'lib/ios/sugarcube-image/cifilter.rb', line 734

def twelvefold_reflected_tile(*options)
  return _create_filter('CITwelvefoldReflectedTile', options)
end

.twirl_distortion(*options) ⇒ Object

CITwirlDistortion

PENDING


740
741
742
# File 'lib/ios/sugarcube-image/cifilter.rb', line 740

def twirl_distortion(*options)
  return _create_filter('CITwirlDistortion', options)
end

.unsharp_mask(*options) ⇒ Object

CIUnsharpMask



745
746
747
# File 'lib/ios/sugarcube-image/cifilter.rb', line 745

def unsharp_mask(*options)
  return _create_filter('CIUnsharpMask', options, [:intensity, :radius], intensity: 'inputIntensity', radius: 'inputRadius')
end

.vibrance(*options) ⇒ Object

CIVibrance



750
751
752
# File 'lib/ios/sugarcube-image/cifilter.rb', line 750

def vibrance(*options)
  return _create_filter('CIVibrance', options, [:amount], amount: 'inputAmount')
end

.vignette(*options) ⇒ Object

CIVignette



755
756
757
# File 'lib/ios/sugarcube-image/cifilter.rb', line 755

def vignette(*options)
  return _create_filter('CIVignette', options, [:radius, :intensity], radius: 'inputRadius', intensity: 'inputIntensity')
end

.vortex_distortion(*options) ⇒ Object

CIVortexDistortion

PENDING


761
762
763
# File 'lib/ios/sugarcube-image/cifilter.rb', line 761

def vortex_distortion(*options)
  return _create_filter('CIVortexDistortion', options)
end

.white_point_adjust(*options) ⇒ Object

CIWhitePointAdjust



766
767
768
769
770
# File 'lib/ios/sugarcube-image/cifilter.rb', line 766

def white_point_adjust(*options)
  return _create_filter('CIWhitePointAdjust', options, [:color], color: 'inputColor') do |key, value|
    value.cicolor
  end
end

Instance Method Details

#ciimageObject



70
71
72
# File 'lib/ios/sugarcube-image/cifilter.rb', line 70

def ciimage
  valueForKey('outputImage')
end

#uiimageObject

| | TYPE COERCTION |



66
67
68
# File 'lib/ios/sugarcube-image/cifilter.rb', line 66

def uiimage
  ciimage.uiimage
end