Class CIRenderDestination

  • All Implemented Interfaces:
    NSObject

    public class CIRenderDestination
    extends NSObject
    This is a lightweight API to allow clients to specify all the attributes of a render that pertain to the render's destination. It is intended to be used for issuing renders that return to the caller as soon as all the work has been issued but before it completes/
    • Constructor Detail

      • CIRenderDestination

        protected CIRenderDestination​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • alphaMode

        public long alphaMode()
        This property will defualt to an appropriate value given the object that the CIRenderDestination was initialized with. This property can be set to a different value if desired.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • blendKernel

        public CIBlendKernel blendKernel()
        Allow client to specify a CIBlendKernel (e.g. CIBlendKernel.sourceOver) to be used on the destination.
      • blendsInDestinationColorSpace

        public boolean blendsInDestinationColorSpace()
        If true, then the blendKernel is applied in the destination's colorSpace. If false, then the blendKernel is applied in the CIContext's working colorspace. This is false by default.
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • colorSpace

        public CGColorSpaceRef colorSpace()
        This property will defualt to an appropriate value given the object that the CIRenderDestination was initialized with. This property can be set to a different colorSpace if desired. This property can be set to nil to disable color matching from the working space to the destination.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • height

        public long height()
      • initWithBitmapDataWidthHeightBytesPerRowFormat

        public CIRenderDestination initWithBitmapDataWidthHeightBytesPerRowFormat​(org.moe.natj.general.ptr.VoidPtr data,
                                                                                  long width,
                                                                                  long height,
                                                                                  long bytesPerRow,
                                                                                  int format)
        Create a CIRenderDestination based on client-managed buffer. The 'data' parameter must point to a buffer that is at least bytesPerRow * height bytes in size. The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB, kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
      • initWithGLTextureTargetWidthHeight

        public CIRenderDestination initWithGLTextureTargetWidthHeight​(int texture,
                                                                      int target,
                                                                      long width,
                                                                      long height)
        Create a CIRenderDestination based on an OpenGL texture. Rendering to a GLTexture-backed CIRenderDestination is only supported by GLContext-backed CIContexts. The texture id must be bound to a GLContext that is shared with that of the GLContext-backed CIContext. The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB, kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
      • initWithIOSurface

        public CIRenderDestination initWithIOSurface​(IOSurface surface)
        Create a CIRenderDestination based on an IOSurface object. The destination's 'colorspace' property will default a CGColorSpace created by, querying the IOSurface attributes.
      • initWithMTLTextureCommandBuffer

        public CIRenderDestination initWithMTLTextureCommandBuffer​(MTLTexture texture,
                                                                   MTLCommandBuffer commandBuffer)
        A render to a MTLTexture-backed CIRenderDestination is only supported by MTLTexture-backed CIContexts. The texture must have a MTLTextureType of MTLTextureType2D An optional MTLCommandBuffer can be specified, with which to use for rendering to the MTLTexture. NOTE: Rendering to a texture initialized with a commandBuffer requires encoding all the commands to render an image into the specified buffer. This may impact system responsiveness and may result in higher memory usage if the image requires many passes to render. To avoid this impact, it is recommended to create a context using [CIContext contextWithMTLCommandQueue:] and create the CIRenderDestination without specifying a buffer. The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB, kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
      • initWithPixelBuffer

        public CIRenderDestination initWithPixelBuffer​(CVBufferRef pixelBuffer)
        Create a CIRenderDestination based on a CVPixelBufferRef object. The destination's 'colorspace' property will default a CGColorSpace created by, querying the CVPixelBufferRef attributes.
      • initWithWidthHeightPixelFormatCommandBufferMtlTextureProvider

        public CIRenderDestination initWithWidthHeightPixelFormatCommandBufferMtlTextureProvider​(long width,
                                                                                                 long height,
                                                                                                 long pixelFormat,
                                                                                                 MTLCommandBuffer commandBuffer,
                                                                                                 CIRenderDestination.Block_initWithWidthHeightPixelFormatCommandBufferMtlTextureProvider block)
        Create a CIRenderDestination based on a Metal texture. Rendering to a MTLTexture-backed CIRenderDestination is only supported by MTLTexture-backed CIContexts. The provider 'block' will be called lazily when the destination is rendered to. The block must return a texture with a MTLTextureType of MTLTextureType2D. The 'width', 'height' and 'pixelFormat' argument values should be the same as the width, height and pixelFormat of the MTLTexture that will be returned by 'block' An optional MTLCommandBuffer can be specified, with which to use for rendering to the MTLTexture. NOTE: Rendering to a texture initialized with a commandBuffer requires encoding all the commands to render an image into the specified buffer. This may impact system responsiveness and may result in higher memory usage if the image requires many passes to render. To avoid this impact, it is recommended to create a context using [CIContext contextWithMTLCommandQueue:] and create the CIRenderDestination without specifying a buffer. The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB, kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isClamped

        public boolean isClamped()
        If true, the render will clamp color channels to 0..alpha if 'alphaMode' is premultiplied otherwise 0..1 This property is initialized to false if the destination's format supports extended range
      • isDithered

        public boolean isDithered()
        Instructs the render to add pseudo-random luma noise given the depth of the destination. The magnitude of the noise is approximatly ±pow(2,-(bitPerComponent+1))
      • isFlipped

        public boolean isFlipped()
        The logical coordinate system of a CIRenderDestination is always cartesian: (0,0) represents the lower-left corner (0.5,0.5) represents the lower-left pixel center (pixelsWide-0.5,pixelsHigh-0.5) represents the upper-right pixel center (pixelsWide,pixelsHigh) represents the upper-right corner. The 'flipped' property controls how pixels this logical coordinate system are stored into the memory of the object backing the destination. If 'flipped' is false, then the base address of the backing stores the pixel centered on the logical coordinate (0.5,0.5) If 'flipped' is true, then the base address of the backing stores the pixel centered on the logical coordinate (0.5,height-0.5)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setAlphaMode

        public void setAlphaMode​(long value)
        This property will defualt to an appropriate value given the object that the CIRenderDestination was initialized with. This property can be set to a different value if desired.
      • setBlendKernel

        public void setBlendKernel​(CIBlendKernel value)
        Allow client to specify a CIBlendKernel (e.g. CIBlendKernel.sourceOver) to be used on the destination.
      • setBlendsInDestinationColorSpace

        public void setBlendsInDestinationColorSpace​(boolean value)
        If true, then the blendKernel is applied in the destination's colorSpace. If false, then the blendKernel is applied in the CIContext's working colorspace. This is false by default.
      • setClamped

        public void setClamped​(boolean value)
        If true, the render will clamp color channels to 0..alpha if 'alphaMode' is premultiplied otherwise 0..1 This property is initialized to false if the destination's format supports extended range
      • setColorSpace

        public void setColorSpace​(CGColorSpaceRef value)
        This property will defualt to an appropriate value given the object that the CIRenderDestination was initialized with. This property can be set to a different colorSpace if desired. This property can be set to nil to disable color matching from the working space to the destination.
      • setDithered

        public void setDithered​(boolean value)
        Instructs the render to add pseudo-random luma noise given the depth of the destination. The magnitude of the noise is approximatly ±pow(2,-(bitPerComponent+1))
      • setFlipped

        public void setFlipped​(boolean value)
        The logical coordinate system of a CIRenderDestination is always cartesian: (0,0) represents the lower-left corner (0.5,0.5) represents the lower-left pixel center (pixelsWide-0.5,pixelsHigh-0.5) represents the upper-right pixel center (pixelsWide,pixelsHigh) represents the upper-right corner. The 'flipped' property controls how pixels this logical coordinate system are stored into the memory of the object backing the destination. If 'flipped' is false, then the base address of the backing stores the pixel centered on the logical coordinate (0.5,0.5) If 'flipped' is true, then the base address of the backing stores the pixel centered on the logical coordinate (0.5,height-0.5)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • width

        public long width()
        MARK: Properties