...

Online Help for Chasys Draw IES: SDK - Layer Attachments - BLND


SDK - Layer Attachments - BLND
 

Using the BLND meta-type

The BLND attachment (Custom Blend-Mode Data) allows plug-ins that generate content with blend-modes not natively supported by Chasys Draw IES to define a custom mode to be used to render such content – the BLND tells Chasys Draw IES how to render the blend-mode. For example, Chasys Draw IES doesn’t have an equivalent for Photoshop’s “Soft Light” mode, so the flt_PSD plug-in adds BLND attachments that define the “Soft Light” mode to layers that need it.

#define META_BLND_VERSION           0x0001

struct meta_BLND_Obj
{
    unsigned short  version;        //BLND version
    unsigned short  unused_1;       //unused, set to zero
    unsigned char   type;
    unsigned char   mode;
    unsigned short  span;
    unsigned long   flags;
    wchar_t         name[32];
    char            unused_2[256-(12+64)];
};

The plug-in requests metadata of size sizeof(meta_BLND_Obj)+size_of_plugin_data. The plug-in then proceeds to fill the header with the type, the mode, the span, and a name in [namespace.Name] format (e.g. “photoshop.SoftLight”). The plug-in populates the rest of the space with the relevant data as defined by the type and span.