LRasterPaintWindow::GetPaintFill

#include "Ltwrappr.h"

PAINTFILL * LRasterPaintWindow::GetPaintFill()

Gets the paint fill properties.

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

LTPNT
LTDIS
LTFIL
LTAUT
LTCON
LTTLB

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:

LRasterPaintWindow::SetPaintFill, Class Members

Example

void OnPropsFill(LRasterPaintWindow *pRasterPntWnd, LBitmapBase* pLBtmpPaperTexture, LBitmapBase *pLBtmpBackTile, HWND hWnd, LRasterDialog *pPaintDialog)
{
   PAINTDLGFILLINFO FillDlgInfo;
   PAINTFILL*       pPaintFill = pRasterPntWnd->GetPaintFill();
   L_INT            nRetCode;
   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);

   nRetCode = pPaintDialog->DoModalFill(hWnd, &FillDlgInfo);

   if(nRetCode == 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);
   }
}