ImageEn, unit imageenview |
|
TImageEnView.SelectionAspectRatio
Declaration
property SelectionAspectRatio: Double;
Description
Specifies whether the selection is locked to a specific size or aspect ratio.
Value | Description |
-1 | Aspect ratio is locked only when user press the ALT key, and is automatically calculated |
-2 | Same as -1, except size of selection cannot be resized to smaller than SelectionAbsWidth and SelectionAbsHeight |
0 | Size of the selection is fixed by the SelectionAbsWidth and SelectionAbsHeight properties |
>0 | Selection is locked to the specified aspect ratio ( of Width / Height ), e.g. 1.25 locks to 4:3 landscape, 0.75 locks to standard portrait, 1.78 locks to 16:9 widescreen format |
Examples
// We want standard behavior (no aspect ratio locking unless user clicks Alt key)
ImageEnView1.SelectionAspectRatio := -1;
// We want standard behavior, except user cannot resize selection to less than 100 x 100 pixels
ImageEnView1.SelectionAbsWidth := 100;
ImageEnView1.SelectionAbsHeight := 100;
ImageEnView1.SelectionAspectRatio := -2;
// We want a fixed selection of 100 x 100 pixels
ImageEnView1.SelectionAbsWidth := 100;
ImageEnView1.SelectionAbsHeight := 100;
ImageEnView1.SelectionAspectRatio := 0;
// We want a fixed aspect ratio of 4:3 (standard landscape, i.e. height is 75% of height)
ImageEnView1.SelectionAspectRatio := 4 / 3;
See Also
-
LockAspectRatio-
LockWidth-
LockHeight