Open Search
    ImagePixelBlendInterface Class Reference

    #include <gfx_image_pixelblend.h>

    Inheritance diagram for ImagePixelBlendInterface:

    Detailed Description

    This class allows to implement and use pixel blending methods. Each pixel blending should has it's own implementation. A enumeration of all available blending methods can be found under ImagePixelBlends registry.

    Public Member Functions

    MAXON_METHOD Result< BlendPixelHandlerStructGetBlendPixelHandler (const PixelFormat &bgFormat, const ChannelOffsets &bgChannelOffsets, const PixelFormat &fgFormat, const ChannelOffsets &fgChannelOffsets, Float opacity) const
     

    Static Public Member Functions

    static MAXON_METHOD Result< PixelFormat > GetOptimalPixelFormat (const Block< PixelFormat > &formats)
     

    Private Member Functions

     MAXON_INTERFACE (ImagePixelBlendInterface, MAXON_REFERENCE_CONST, "net.maxon.image.interface.imagepixelblend")
     

    Member Function Documentation

    ◆ MAXON_INTERFACE()

    MAXON_INTERFACE ( ImagePixelBlendInterface  ,
    MAXON_REFERENCE_CONST  ,
    "net.maxon.image.interface.imagepixelblend"   
    )
    private

    ◆ GetOptimalPixelFormat()

    static MAXON_METHOD Result<PixelFormat> GetOptimalPixelFormat ( const Block< PixelFormat > &  formats)
    static

    GetOptimalPixelFormat returns the optimal blending PixelFormat.

    Parameters
    [in]formatsInput formats to respect. Depending on that formats the result might change.
    Returns
    Optimal blending pixel format to deliver to GetBlendPixel() function.

    ◆ GetBlendPixelHandler()

    MAXON_METHOD Result<BlendPixelHandlerStruct> GetBlendPixelHandler ( const PixelFormat &  bgFormat,
    const ChannelOffsets bgChannelOffsets,
    const PixelFormat &  fgFormat,
    const ChannelOffsets fgChannelOffsets,
    Float  opacity 
    ) const

    GetBlendPixelHandler create a handler object to be used when conversion pixel data.

    Parameters
    [in]bgFormatPixelFormat for the background layer.
    [in]bgChannelOffsetsChannel offsets for the background layer.
    [in]fgFormatPixelFormat for the foreground layer.
    [in]fgChannelOffsetsChannel offsets for the foreground layer.
    [in]opacityBlend opacity to use.
    Returns
    BlendPixelHandlerStruct on success. On that object BlendPixel() can be called to use the optimized blending function for a line of pixels.