LRasterPaintWindow::GetPaintShape

Summary

Gets the paint shape properties.

Syntax

#include "Ltwrappr.h"

PAINTSHAPE * LRasterPaintWindow::GetPaintShape()

Returns

Pointer to a PAINTSHAPE structure that contains the current paint shape properties.

Comments

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

PAINTSHAPE

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

Required DLLs and Libraries

See Also

Functions

Example

L_INT LRasterPaintWindow_GetPaintShapeExample(LRasterPaintWindow *pRasterPntWnd, LBitmapBase *pLBtmpBackTile, LBitmapBase* pLBtmpPaperTexture, HBITMAP hBorderTile, HWND hWnd, LRasterDialog *pPaintDialog) 
{ 
   L_INT             nRet; 
   PAINTDLGSHAPEINFO ShapeDlgInfo; 
   PAINTSHAPE*       pPaintShape          = pRasterPntWnd->GetPaintShape(); 
   L_TCHAR*          BKTileBitmap [ ]     = { TEXT("Blocks") }; 
   L_TCHAR*          BorderTileBitmap [ ] = { TEXT("Border-00") }; 
   L_TCHAR*          TextureBitmap [ ]    = { TEXT("Texture-00") }; 
 
   ShapeDlgInfo.dwFlags                         = PAINT_DLG_SHAPE_SHOWALL; 
   ShapeDlgInfo.pszTitle                        = TEXT("Shape Properties"); 
   ShapeDlgInfo.nBackgroundStyle                = pPaintShape->nBackgroundStyle; 
   ShapeDlgInfo.crBackgroundColor               = pPaintShape->crBackgroundColor; 
   ShapeDlgInfo.ppszBackgroundTileBitmap        = BKTileBitmap; 
   ShapeDlgInfo.uBackgroundTileBitmapCount      = 1; 
   ShapeDlgInfo.nActiveBackgroundTileBitmapItem = 0; 
   ShapeDlgInfo.nBorderStyle                    = pPaintShape->nBorderStyle; 
   ShapeDlgInfo.nBorderBrushStyle               = pPaintShape->nBorderBrushStyle;  
   ShapeDlgInfo.crBorderColor                   = pPaintShape->crBorderColor; 
   ShapeDlgInfo.ppszBorderTileBitmap            = BorderTileBitmap; 
   ShapeDlgInfo.uBorderTileBitmapCount          = 1; 
   ShapeDlgInfo.nActiveBorderTileBitmapItem     = 0; 
   ShapeDlgInfo.nBorderWidth                    = pPaintShape->nBorderWidth; 
   ShapeDlgInfo.nBorderEndCap                   = pPaintShape->nBorderEndCap; 
   ShapeDlgInfo.nGradientStyle                  = pPaintShape->nGradientStyle; 
   ShapeDlgInfo.crGradientStartColor            = pPaintShape->crGradientStartColor; 
   ShapeDlgInfo.crGradientEndColor              = pPaintShape->crGradientEndColor; 
   ShapeDlgInfo.uGradientSteps                  = pPaintShape->uGradientSteps; 
   ShapeDlgInfo.nRoundRectEllipseWidth          = pPaintShape->nRoundRectEllipseWidth; 
   ShapeDlgInfo.nRoundRectEllipseHeight         = pPaintShape->nRoundRectEllipseHeight; 
   ShapeDlgInfo.nOpacity                        = pPaintShape->nOpacity; 
   ShapeDlgInfo.ppszPaperTexture                = TextureBitmap; 
   ShapeDlgInfo.uPaperTextureCount              = 1; 
   ShapeDlgInfo.nActivePaperTextureItem         = ((pPaintShape->pTexture != NULL) ? 0 : -1); 
 
   nRet = pPaintDialog->DoModalShape(hWnd, &ShapeDlgInfo); 
 
   if(nRet == SUCCESS) 
   { 
      pPaintShape->nSize                   = sizeof(PAINTSHAPE); 
      pPaintShape->dwMask                  = PSF_ALL; 
      pPaintShape->nBackgroundStyle        = ShapeDlgInfo.nBackgroundStyle;    
      pPaintShape->crBackgroundColor       = ShapeDlgInfo.crBackgroundColor;      
      pPaintShape->pBackgroundTileBitmap   = ((ShapeDlgInfo.nActiveBackgroundTileBitmapItem != -1) ? pLBtmpBackTile->GetHandle() : NULL); 
      pPaintShape->nBorderStyle            = ShapeDlgInfo.nBorderStyle; 
      pPaintShape->nBorderBrushStyle       = ShapeDlgInfo.nBorderBrushStyle;  
      pPaintShape->crBorderColor           = ShapeDlgInfo.crBorderColor;    
      pPaintShape->hBorderTileBitmap       = ((ShapeDlgInfo.nActiveBorderTileBitmapItem != -1) ? hBorderTile : NULL); 
      pPaintShape->nBorderWidth            = ShapeDlgInfo.nBorderWidth; 
      pPaintShape->nBorderEndCap           = ShapeDlgInfo.nBorderEndCap;  
      pPaintShape->nGradientStyle          = ShapeDlgInfo.nGradientStyle; 
      pPaintShape->crGradientStartColor    = ShapeDlgInfo.crGradientStartColor;         
      pPaintShape->crGradientEndColor      = ShapeDlgInfo.crGradientEndColor;        
      pPaintShape->uGradientSteps          = ShapeDlgInfo.uGradientSteps;   
      pPaintShape->nRoundRectEllipseWidth  = ShapeDlgInfo.nRoundRectEllipseWidth;  
      pPaintShape->nRoundRectEllipseHeight = ShapeDlgInfo.nRoundRectEllipseHeight;  
      pPaintShape->nOpacity                = ShapeDlgInfo.nOpacity; 
      pPaintShape->pTexture                = ((ShapeDlgInfo.nActivePaperTextureItem != -1) ? pLBtmpPaperTexture->GetHandle(): NULL); 
 
      pRasterPntWnd->SetPaintShape (pPaintShape); 
   } 
 
   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 DigitalPaint C++ Class Library Help

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