Search code examples
ioscore-imagecifilter

How to use CIFilterShape


I've searched far and wide and can't find a single example of how to use a CIFilterShape, and what it's good for. Most Apple docs just say it controls the dod of a filter, even the CoreImage Reference doesn't actually discuss how to use it.

A dumb simple assumption would be to use it transform the dimensions and offsets of a single rectangle and pass that shape directly to -[CIKernel applyWithExtent].

Such a usage wouldn't really create a stenciling effect though, which is what I would expect from a filter shape. Can anyone explain and perhaps provide some examples as to the actual usage of CIFilterShape?


Solution

  • CIFilter slide

    It appears to be the corresponding type for the kCIApplyOptionDefinition key for the domain of definition (DoD) which I have only found referenced in WWDC10 session 426 slide 54 above. Here is a link to the slides as well.