Gets the paint fill properties.
#include "Ltwrappr.h"
PAINTFILL * LRasterPaintWindow::GetPaintFill()
Pointer to a PAINTFILL structure that contains the current paint fill properties.
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:
LRasterPaintWindow::Initialize must be called before calling this function.
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;
}