ImageEn, unit iexHelperFunctions

TIEBitmapHelper.FillWithShape

TIEBitmapHelper.FillWithShape


Declaration

procedure FillWithShape(Shape: TIEShape;
                        iWidth, iHeight: Integer;
                        BorderColor: TColor;
                        BorderWidth: Integer;
                        FillColor: TColor;
                        AlphaFill: Boolean = False;
                        UsePreferedAR: Boolean = True;
                        Margins: Integer = 0);


Description

Draws a TIEShape to the bitmap.
Width/Height are the size to draw the shape (Bitmap will be sized to this too). If -1,-1 is specified the current size is used.
BorderColor, BorderWidth and FillColor specify the style (pass -1 for colors to use a random color).
AlphaFill = False gives the image a white background. True uses an alpha background.
Some shapes look better when output at their designed aspect ratio. Disable UsePreferedAR to fill the entire image.
Specifying a Margins will add spacing around the image.

Note:
 You must add the iexHelperFunctions unit to your uses clause
 If attached to a TImageEnView, it will automatically call Update


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Examples

// Fill bitmap with a heart shape
ImageEnView1.IEBitmap.FillWithShape( iesHeart, 200, 200, clNone, 0, clRed, True );


See Also

 AdvancedDrawShape
 IEDrawShape