Index

CDTEngineV8

OutputSetStyleAttribs

This function supplies style to the Output of the specified Standard Engine instance. Style is a set of style properties that are applied to output primitives (glyphs/characters, shapes, bitmaps) during rendering. These properties are: color, transparency and various special effects such as shadow, glow, pattern fill, emboss, blur, emboldening etc. All these properties can be defined using the DT_STYLE_ATTRIBS structure.

Parameters

ParameterDescription

style

A valid pointer to the DT_STYLE_ATTRIBS structure. This structure contains the style to be associated with the Output of the specified Standard Engine instance.

reserved

Reserved for future use. Must be set to 0.

Return Value

If successful, the return value is 1. Otherwise, the function returns 0.

Comments

This function must be called after OutputSetAsMDC or OutputSetAsHDC. This is necessary because style properties are dependent on the output surface.

Example 1

DT_STYLE_ATTRIBS style = {{DV_EFFECT_EDGE_100_NE, 15}, {0, 0, 0, 0}, 0, DV_NULL};

/*
   The above initialization is the same as

   style.ep[0] = DV_EFFECT_EDGE_100_NE;
   style.ep[1] = 15
   style.rgbt[0] = 0;
   style.rgbt[1] = 0;
   style.rgbt[2] = 0;
   style.rgbt[3] = 0;
   style.reserved = 0;
   style.palette = DV_NULL;
*/ 

dtOutputSetStyleAttribs(engine, &style, 0);

Output of glyph R using the above style:

R

Example 2

DT_STYLE_ATTRIBS style = {{DV_EFFECT_HVBLUR_FUZZY, 15}, {0, 48, 178, 200}, 0, DV_NULL};

/*
   The above initialization is the same as

   style.ep[0] = DV_EFFECT_HVBLUR_FUZZY;
   style.ep[1] = 15
   style.rgbt[0] = 0;
   style.rgbt[1] = 48;
   style.rgbt[2] = 178;
   style.rgbt[3] = 200;
   style.reserved = 0;
   style.palette = DV_NULL;
*/ 

dtOutputSetStyleAttribs(engine, &style, 0);

Output of glyph R using the above style:

R

Example 3

DT_STYLE_ATTRIBS style = {{DV_EFFECT_PATTERN_STRIPES, 4}, {255, 0, 0, 0}, 0, DV_NULL};

/*
   The above initialization is the same as

   style.ep[0] = DV_EFFECT_PATTERN_STRIPES;
   style.ep[1] = 4
   style.rgbt[0] = 255;
   style.rgbt[1] = 0;
   style.rgbt[2] = 0;
   style.rgbt[3] = 0;
   style.reserved = 0;
   style.palette = DV_NULL;
*/ 

dtOutputSetStyleAttribs(engine, &style, 0);

Output of glyph R using the above style:

R



 

Index