ImageEn, unit imageenview

TImageEnView.SelectRoundRect

TImageEnView.SelectRoundRect

Declaration

procedure SelectRoundRect(Left, Top, Right, Bottom, RoundWidth, RoundHeight: integer; Op: TIESelOp = iespReplace);

Description

Creates a rectangular selection with rounded corners.
Left, Top, Right, Bottom are the rectangle coordinates.
RoundWidth and RoundHeight specify the size of the rounding (in pixels).
Op specifies whether to add a new selection (iespAdd) or replace the current one (iespReplace).

The style of selection are specified by:
SelColor1
SelColor2
SetSelectionGripStyle

Note:
SelectRoundRect creates a "vectorized" selection (the selection will be made up of a series of lines and can be accessed via PolySel)
You can allow your user to make a rounded rectangular selection by enabling SelectionRounding

Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Example

// Add a curved rectangular selection and clear
ImageEnView1.SelectionBase := iesbBitmap;
ImageEnView1.SelectRoundRect( 160, 120, ImageEnView1.IEBitmap.Width - 160, ImageEnView1.IEBitmap.Height - 120, 30, 30 );


ImageEnView1.Proc.ClearSel( True );

Other Selection Methods

Select
SelectEllipse
SelectMagicWand
SelectChromaKey
SelectShape
SelectCustom

View a preview of all selection types

See Also

InvertSelection
Deselect