L_AutSetPaintProperty
#include ltaut.h
L_LTAUT_API L_INT L_AutSetPaintProperty(pAutomation, nGroup, pProperty)
pAUTOMATIONHANDLE pAutomation; |
/* pointer to an automation handle */ |
PAINTGROUP nGroup; |
/* type of paint properties */ |
const L_VOID * pProperty; |
/* pointer to a PAINTXXX structure */ |
Sets the digital paint automation properties.
Parameter |
Description |
|
pAutomation |
Pointer to an automation handle. |
|
nGroup |
Indicates the paint properties to set and the structure pointed to by pProperty. Possible values are: |
|
|
Value |
Meaning |
|
PAINT_GROUP_BRUSH |
Set the Paintbrush properties. pProperty points to a PAINTBRUSH structure. |
|
PAINT_GROUP_SHAPE |
Set the Paint shape properties. pProperty points to a PAINTSHAPEstructure. |
|
PAINT_GROUP_REGION |
Set the Paint region properties. pProperty points to a PAINTREGION structure. |
|
PAINT_GROUP_FILL |
Set the Paint fill properties. pProperty points to a PAINTFILLstructure. |
|
PAINT_GROUP_TEXT |
Set the Paint fill properties. pProperty points to a PAINTTEXT structure. |
pProperty |
Pointer to a PAINTXXX structure to be updated with the specified property values. The type of structure that this parameter points to is indicated by the nGroup parameter. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Note: |
This function is only available in the Digital Paint toolkits. |
This function will only work if the automation handle was created using the AUTOMATION_MODE_PAINT automation mode. For information on creating an automation handle, refer to L_AutCreate.
Required DLLs and Libraries
LTAUT For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
See Also
Functions: |
|
Topics: |
Example
This example shows how to change the paint shape properties.
L_INT AutSetPaintPropertyExample(pAUTOMATIONHANDLE pAutomation) { L_INT nRet; nRet = L_AutIsValid ( pAutomation ); if ( SUCCESS == nRet ) /* check the validity of the automation handle */ { PAINTSHAPE shape ; /* set the paint shape group properties */ nRet = L_AutGetPaintProperty ( pAutomation, PAINT_GROUP_SHAPE, &shape ) ; if(nRet != SUCCESS) return nRet; /* do some check and change to the required properties */ if (PAINT_SHAPE_BORDER_STYLE_SOLID == shape.nBorderStyle ) { /* set the desired shape properties using the field masks */ shape.nSize = sizeof ( PAINTSHAPE ) ; shape.dwMask = PSF_BORDERSTYLE | PSF_BORDERWIDTH | PSF_BORDERENDCAP; shape.nBorderStyle = PAINT_SHAPE_BORDER_STYLE_DOT ; shape.nBorderWidth = 10 ; shape.nBorderEndCap = PAINT_SHAPE_BORDER_ENDCAP_ROUND ; /*set the paint shape group properties */ nRet = L_AutSetPaintProperty ( pAutomation, PAINT_GROUP_SHAPE, &shape ) ; if(nRet != SUCCESS) return nRet; } return SUCCESS ; } else { return nRet ; } }