PAINTDLGBRUSHINFO

typedef struct _PAINTDLGBRUSHINFO 
{ 
   L_INT nSize; 
   L_INT32 dwFlags; 
   L_TCHAR *pszTitle; 
   PAINTTOUCHCONTENTS nContentsType; 
   COLORREF crColor; 
   L_TCHAR ** ppszTouchImage; 
   L_UINT uTouchImageCount; 
   L_INT nActiveTouchImageItem; 
   COLORREF crTransparentColor; 
   L_INT nDiameter; 
   L_INT nHardnessValue; 
   L_INT nSpacing; 
   L_INT nDensity; 
   L_INT nOpacity; 
   L_INT nFadeOutRate; 
   L_TCHAR ** ppszPaperTexture; 
   L_UINT uPaperTextureCount; 
   L_INT nActivePaperTextureItem; 
    
} PAINTDLGBRUSHINFO, *pPAINTDLGBRUSHINFO; 

The PAINTDLGBRUSHINFO structure contains information about the paintbrush properties dialog.

Member Description
nSize Size of this structure.
dwFlags User interface flags for dialog. Determines the layout and action of the dialog. Possible values are:
  Setting Description
  PAINT_DLG_BRUSH_SHOWALL [0x00000001] Show all controls
  PAINT_DLG_BRUSH_SHOWTOUCHCONTENT [0x00000002] Show touch contents control
  PAINT_DLG_BRUSH_SHOWTOUCHCOLOR [0x00000004] Show touch color control
  PAINT_DLG_BRUSH_SHOWTOUCHIMAGE [0x00000008] Show touch image control
  PAINT_DLG_BRUSH_SHOWDIAMETER [0x00000010] Show diameter control
  PAINT_DLG_BRUSH_SHOWHARDNESS [0x00000020] Show hardness control
  PAINT_DLG_BRUSH_SHOWSPACING [0x00000040] Show spacing control
  PAINT_DLG_BRUSH_SHOWOPACITY [0x00000080] Show opacity control
  PAINT_DLG_BRUSH_SHOWDENSITY [0x00000100] Show density control
  PAINT_DLG_BRUSH_SHOWFADEOUTRATE [0x00000200] Show fadeout rate control
  PAINT_DLG_BRUSH_SHOWTEXTURE [0x00000400] Show texture control
  PAINT_DLG_BRUSH_SHOWDEFAULT [0x00000800] Show Default control
  PAINT_DLG_BRUSH_INITUSEDEFAULT [0x00001000] Use the default values to initialize the dialog control.
  PAINT_DLG_BRUSH_SHOWTRANSPARENTCOLOR [0x00002000] Show transparent color control.
pszTitle Character string containing the dialog box caption text.
nContentsType An enumeration type that represents the contents of the paintbrush . For a list of possible values, refer to PAINTTOUCHCONTENTS.
crColor COLORREF value that specifies the paintbrush color when the nContentsType is PAINT_TOUCH_CONTENTS_COLOR.
ppszTouchImage Array of strings containing the names of the images used to fill the touch image combo box.
uTouchImageCount Number of strings used to fill the touch image combo box.
nActiveTouchImageItem Index to the current image selected in the touch image combo box. This is a zero-based index.
crTransparentColor This value represents the transparent color of the paintbrush image.
nDiameter Value indicating the size of the brush in pixels. Valid values are between 1 and 200.
nHardnessValue Value indicating the hardness of the brush. Valid values are between 1 and 100.
nSpacing Value indicating how often the paintbrush tip touches the surface during a paint stroke. When the spacing is 30 this means that the brush tip will touch the painting surface once every 30 pixels. Valid values are between 1 and 1000.
nDensity Value indicating the amount of paint the brush applies with each stroke. Increasing the density of the brush is comparable to increasing the number of bristles in the brush. With more bristles, more paint is applied in a stroke. Similarly, decreasing the density decreases the number of bristles in the brush. With fewer bristles, less paint is applied in a stroke. Valid values are 1 to 100 and represent a percentage. A value of 100% results in the surface being completely covered with paint. A value of 1% results in very little paint being applied to the surface.
nOpacity Value indicating the transparency of the brush touch when combined with the painting canvas. Valid values are between 0 and 255. A color or an image with an opacity of 255 is transparent. A color or an image with an opacity of 0 is completely opaque (solid).
nFadeOutRate Value indicating the rate at which the brush contents will fade (become more transparent). Valid values are between 0 and 10000. 0 means no fadeout will occur. Other values (1-10000) will increase transparency every nSpacing pixels until total transparency is reached.
ppszPaperTexture Array of strings containing the names of the images used to fill the paper texture combo box.
uPaperTextureCount Number of strings in the paper texture array.
nActivePaperTextureItem Index of the current image selected in the paper texture combo box. This is a zero-based index.

Comment

The image below shows the paintbrush properties dialog:

image\a2.gif

When the uTouchImageCount field value is 0 or when the ppszTouchImage field value is NULL the toolkit will return the following values:

ppszTouchImage           = NULL    
uTouchImageCount       = 0    
nActiveTouchImageItem = -1  

The nActivePaperTextureItem field value will be 1 when the user selects "none" from the paper texture combo box.

When the value of the nActivePaperTextureItem is set to 1, the current selection in the paper texture combo box will be "none".

When the User presses the default button, the dialog box will reset to the default values, for all fields, except nActiveTouchImageItem. The nActiveTouchImageItem value will be the value it was before the last call to the Dialog box.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DigitalPaint C++ Class Library Help