LRasterPaintWindow::GetPaintFill

Summary

Gets the paint fill properties.

Syntax

#include "Ltwrappr.h"

PAINTFILL * LRasterPaintWindow::GetPaintFill()

Returns

Pointer to a PAINTFILL structure that contains the current paint fill properties.

Comments

If this function is called before LRasterPaintWindow::SetPaintFill has been called, the default values will be returned. For more information about the default property values, refer to:

PAINTFILL

LRasterPaintWindow::Initialize must be called before calling this function.

Required DLLs and Libraries

See Also

Functions

Example

L_INT LRasterPaintWindow_GetPaintFillExample(LRasterPaintWindow *pRasterPntWnd, LBitmapBase* pLBtmpPaperTexture, LBitmapBase *pLBtmpBackTile, HWND hWnd, LRasterDialog *pPaintDialog) 
{ 
   L_INT             nRet; 
   PAINTDLGFILLINFO  FillDlgInfo; 
   PAINTFILL*        pPaintFill = pRasterPntWnd->GetPaintFill(); 
   L_TCHAR*          BKTileBitmap [ ]  = { TEXT("Blocks") };  
   L_TCHAR*          TextureBitmap [ ] = { TEXT("Texture-00") };  
 
   FillDlgInfo.dwFlags                         = PAINT_DLG_FILL_SHOWALL; 
   FillDlgInfo.pszTitle                        = TEXT("Fill Properties"); 
   FillDlgInfo.nStyle                          = pPaintFill->nStyle; 
   FillDlgInfo.crSolidFillColor                = pPaintFill->crSolidFillColor; 
   FillDlgInfo.ppszBackgroundTileBitmap        = BKTileBitmap; 
   FillDlgInfo.uBackgroundTileBitmapCount      = 1; 
   FillDlgInfo.nActiveBackgroundTileBitmapItem = 0; 
   FillDlgInfo.nGradientStyle                  = pPaintFill->nGradientStyle; 
   FillDlgInfo.crGradientStartColor            = pPaintFill->crGradientStartColor; 
   FillDlgInfo.crGradientEndColor              = pPaintFill->crGradientEndColor; 
   FillDlgInfo.uGradientSteps                  = pPaintFill->uGradientSteps; 
   FillDlgInfo.crUpperTolerance                = pPaintFill->crUpperTolerance; 
   FillDlgInfo.crLowerTolerance                = pPaintFill->crLowerTolerance; 
   FillDlgInfo.nOpacity                        = pPaintFill->nOpacity; 
   FillDlgInfo.ppszPaperTexture                = TextureBitmap; 
   FillDlgInfo.uPaperTextureCount              = 1; 
   FillDlgInfo.nActivePaperTextureItem         = ((pPaintFill->pTexture != NULL) ? 0 : -1); 
 
   nRet = pPaintDialog->DoModalFill(hWnd, &FillDlgInfo); 
 
   if(nRet == SUCCESS) 
   { 
      pPaintFill->nSize                 = sizeof(PAINTFILL); 
      pPaintFill->dwMask                = PFF_ALL;  
      pPaintFill->nStyle                = FillDlgInfo.nStyle;  
      pPaintFill->crSolidFillColor      = FillDlgInfo.crSolidFillColor; 
      pPaintFill->pBackgroundTileBitmap = ((FillDlgInfo.nActiveBackgroundTileBitmapItem != -1) ? pLBtmpBackTile->GetHandle() : NULL); 
      pPaintFill->nGradientStyle        = FillDlgInfo.nGradientStyle; 
      pPaintFill->crGradientStartColor  = FillDlgInfo.crGradientStartColor; 
      pPaintFill->crGradientEndColor    = FillDlgInfo.crGradientEndColor; 
      pPaintFill->uGradientSteps        = FillDlgInfo.uGradientSteps; 
      pPaintFill->crUpperTolerance      = FillDlgInfo.crUpperTolerance; 
      pPaintFill->crLowerTolerance      = FillDlgInfo.crLowerTolerance; 
      pPaintFill->nOpacity              = FillDlgInfo.nOpacity;  
      pPaintFill->pTexture              = ((FillDlgInfo.nActivePaperTextureItem != -1) ? pLBtmpPaperTexture->GetHandle() : NULL); 
 
      pRasterPntWnd->SetPaintFill (pPaintFill); 
   } 
 
   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 DigitalPaint C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.