ImageEn, unit imageenview

TImageEnView.CropTool

TImageEnView.CropTool


Declaration

property CropTool: TIECropToolInteraction;


Description

Provides access to the methods and properties of the TIECropToolInteraction class, which is used when MouseInteractGeneral is miCropTool.

The crop tool allows the user to select an area of the image to keep and then click "Enter" to apply the crop. The selection can also be rotated so the image is rotated and then cropped.

In Crop Tool mode:
- User can resize crop box by dragging grips
- User can rotate crop by dragging outside grips
- User can click "Enter" to enact the crop
- User can click "Esc" to cancel the crop


Rotated Crop




Perspective Fix




Demo

Demo  Demos\ImageEditing\CropTool\CropTool.dpr


Example

// Disable guide lines (on image thirds)
ImageEnView1.CropTool.DrawGuides := False;

// Make larger grips
ImageEnView1.CropTool.GripSize := 12;

// High quality cropping
ImageEnView1.CropTool.AntialiasMode := ierBicubic;

// Enable crop mode
ImageEnView1.MouseInteractGeneral := [miCropTool];

// Enact crop (same as user clicking "Enter")
ImageEnView1.CropTool.Crop();

// Cancel crop tool (same as user clicking "Esc")
ImageEnView1.CropTool.Cancel();


See Also

- KeyboardShortcuts