LRasterPaintWindow::GetPaintBrush

Summary

Gets the paintbrush properties.

Syntax

#include "Ltwrappr.h"

PAINTBRUSH * LRasterPaintWindow::GetPaintBrush()

Returns

Pointer to a PAINTBRUSH structure that contains the current paintbrush properties.

Comments

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

PAINTBRUSH

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

Required DLLs and Libraries

See Also

Functions

Example

L_INT LRasterPaintWindow_GetPaintBrushExample(LRasterPaintWindow  *pRasterPntWnd, LBitmapBase  *LBtmpBrush) 
{ 
   PAINTBRUSH* pPaintBrush  =  pRasterPntWnd->GetPaintBrush(); 
 
   pPaintBrush->nSize                        = sizeof (PAINTBRUSH); 
   pPaintBrush->dwMask                       = PBF_ALL;  
   pPaintBrush->Touch.nContentsType          = PAINT_TOUCH_CONTENTS_COLOR;  
   pPaintBrush->Touch.crColor                = RGB (255, 0, 0);  
   pPaintBrush->Touch.crTransparentColor     = RGB (0, 0, 0);  
   pPaintBrush->Touch.nShape                 = PAINT_TOUCH_SHAPE_CIRCLE;  
   pPaintBrush->Touch.pBitmap                = LBtmpBrush->GetHandle(); 
   pPaintBrush->nDiameter                    = PAINT_BRUSH_MIN_DIAMETER; 
   pPaintBrush->Hardness.nDistributionType   = PAINT_HARDNESS_DISTRB_TYPE_0;  
   pPaintBrush->Hardness.nValue              = PAINT_BRUSH_MIN_HARDNESS;  
   pPaintBrush->nSpacing                     = PAINT_BRUSH_MIN_SPACING; 
   pPaintBrush->nDensity                     = PAINT_BRUSH_MAX_DENSITY; 
   pPaintBrush->nOpacity                     = PAINT_BRUSH_MAX_OPACITY;  
   pPaintBrush->nFadeOutRate                 = PAINT_BRUSH_MIN_FADEOUT; 
   pPaintBrush->pTexture                     = NULL; 
 
   pRasterPntWnd->SetPaintBrush (pPaintBrush); 
 
   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.