ImageEn, unit iexUserInteractions |
|
TIECropToolInteraction.LockHeight
Declaration
property LockHeight: Integer;
Description
Allows the height of the crop selection to be locked to a specific size. e.g. 200 pixels high.
Note:
◼Values refer to bitmap pixels, not a screen dimension
◼Can be used independently of
LockWidth◼if
iecoSizeLocksAreMinimums is specified in
Options, then this value is a minimum only
◼Has no effect if
LockAspectRatio > 0 (unless
iecoSizeLocksAreMinimums is used)
// we want standard behavior
ImageEnView1.CropTool.LockHeight := 0;
ImageEnView1.CropTool.LockHeight := 0;
// Lock the height to 500 pixels (but width can be changed)
ImageEnView1.CropTool.LockAspectRatio := 0;
ImageEnView1.CropTool.LockHeight := 500;
ImageEnView1.CropTool.LockWidth := 0;
// Lock width and height to half the image size
ImageEnView1.CropTool.LockAspectRatio := 0;
ImageEnView1.CropTool.LockWidth := ImageEnView1.IEBitmap.Width div 2;
ImageEnView1.CropTool.LockHeight := ImageEnView1.IEBitmap.Height div 2;
// Do not allow a selection smaller than 100x100 pixels
ImageEnView1.CropTool.Options := [iecoSizeLocksAreMinimums];
ImageEnView1.CropTool.LockWidth := 100;
ImageEnView1.CropTool.LockHeight := 100;
| Demos\ImageEditing\CropTool\CropTool.dpr |
See Also
◼LockWidth◼LockAspectRatio◼Options◼SelectionAbsHeight