ImageEn, unit iexUserInteractions

TIECursorToolInteraction.GetBrushPreview

TIECursorToolInteraction.GetBrushPreview


Declaration

function GetBrushPreview(): TIEBitmap; overload;
function GetBrushPreview(Width, Height: Integer;
                         BrushFill: TIEBrushFill;
                         BrushShape: TIECursorShape;
                         Color1, Color2: TColor;
                         BrushGradient: TIEGDIPlusGradient = gpgNone;
                         BrushRotate: Double = 0;
                         BrushImage : TIEBitmap = nil;
                         Feathering : integer = -1;
                         BrushSprayDensity : Double = -1;
                         BrushTextureAlphaMin : integer = -1;
                         BrushTextureAlphaMax : integer = -1
                         ): TIEBitmap; overload;


Description

Fills a preview of the brush to Dest.
Result will be created by the method. You will need to free it.
First overload uses the current properties of the brush. Second allows you to pass your own values.


Example

// Show a preview in ievPreview of the brush for the interaction tool selected in ImageEnView1
if miRetouchTool in ImageEnView1.MouseInteractGeneral then
  bmp := ImageEnView1.RetouchTool.GetBrushPreview()
else
if miCloneTool in ImageEnView1.MouseInteractGeneral then
  bmp := ImageEnView1.CloneTool.GetBrushPreview()
else
  // miBrushTool
  bmp := ImageEnView1.BrushTool.GetBrushPreview();
ievPreview.Assign( bmp );
bmp.Free;