ImageEn, unit imageenview

TImageEnView.SelectMagicWand

TImageEnView.SelectMagicWand


Declaration

procedure SelectMagicWand(x, y: Integer; Op: TIESelOp = iespReplace; CheckAlpha: Boolean = False);


Description

Selects an irregular region that has similar colors.

It uses the following properties:
MagicWandMode
MagicWandSize
MagicWandTolerance
MagicWandMaxFilter

Parameter Description
x Starting horizontal coordinate
y Starting vertical coordinate
Op If Op is iespReplace the region replaces the existing selection, otherwise if Op is iespAdd, the region is appended to the existing selection
CheckAlpha If true, it also considers the AlphaChannel when matching

Note:
If SelectionBase = iesbClientArea then x and y are assumed to be visible points on the control. If iesbBitmap, the points specify a position on the bitmap.
This is the programmatic equivalent of setting miSelectMagicWand in MouseInteractGeneral
MagicWandMode determines the nature of the magic wand selection. For iewInclusive a "vectorized" selection is created (i.e. the selection will be made up of a series of lines and can be accessed via PolySel). For other types a "bitmap" selection is used (to determine whether specific pixels are selected, use IsPointInsideSelection)


Example

ImageEnView1.SelectMagicWand(10, 10, iespReplace);


See Also

SelectionBase
SelectionIntensity
SelectColors
SelectChromaKey


Loading contents...