L_AutSetPaintBkColor

Summary

Sets the paint automation background color.

Syntax

#include "ltaut.h"

L_LTAUT_API L_INT L_AutSetPaintBkColor (pAutomation, rcBKColor)

Parameters

pAUTOMATIONHANDLE pAutomation

Pointer to an automation handle.

COLORREF rcBKColor

The COLORREF value that specifies the new background color.

Returns

Value Meaning
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.

This color will be used by the automation to fill the area left behind when the user cuts or deletes a selected region from the bitmap.

The default color is RGB (0, 0, 0).

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will make sure that the BK is not anything but black.

L_INT AutSetPaintBkColorExample(pAUTOMATIONHANDLE pAutomation) 
{ 
   L_INT nRet; 
   nRet = L_AutIsValid ( pAutomation ); 
   if ( SUCCESS == L_AutIsValid ( pAutomation ) ) /* check the validity of the automation handle */ 
   { 
      COLORREF crBkColor ; 
 
      /* get the current paint automation color */ 
      nRet = L_AutGetPaintBkColor ( pAutomation, &crBkColor ) ; 
      if(nRet != SUCCESS) 
         return nRet; 
 
      if ( crBkColor != RGB ( 0, 0, 0 ) ) /* check if its not black */ 
      { 
         /* set the paint automation background color */  
         nRet = L_AutSetPaintBkColor ( pAutomation, RGB(0, 0, 0 ) ) ; 
         if(nRet != SUCCESS) 
            return nRet; 
      } 
      return SUCCESS ; 
   } 
   else 
   { 
      return nRet ; 
   } 
} 

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

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