LAutomation::SetPaintProperty

Summary

Sets the DigitalPaint automation properties. This function is only available in the Digital Paint toolkits.

Syntax

#include "Ltwrappr.h"

L_INT LAutomation::SetPaintProperty(nGroup, pProperty)

Parameters

PAINTGROUP 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 PAINTSHAPE structure.
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 PAINTFILL structure.
PAINT_GROUP_TEXT Set the Paint fill properties. pProperty points to a PAINTTEXT structure.

const L_VOID * 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

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function will only work when the automation mode is AUTOMATION_MODE_PAINT.

Required DLLs and Libraries

See Also

Functions

Example

This example shows how to change the paint shape properties.

L_INT LAutomation_SetPaintPropertyExample( LAutomation &Automation )  
 
{ 
   L_INT nRet; 
 
   nRet = Automation.IsValid (); 
 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
 
   { 
 
      PAINTSHAPE shape ;  
 
      /* set the paint shape group properties */ 
 
      nRet = Automation.GetPaintProperty (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 = Automation.SetPaintProperty (PAINT_GROUP_SHAPE, &shape ) ;  
         if(nRet != SUCCESS) 
            return nRet; 
 
      } 
 
   } 
 
   else 
 
   { 
 
      return nRet ; 
 
   } 
 
   return SUCCESS ; 
 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.