ImageEn, unit imageenview

TImageEnView.ShiftKeyLock

TImageEnView.ShiftKeyLock


Declaration


property ShiftKeyLock: TIEShiftLock;


Description


Forces the application of the ssCtrl, ssShift or ssAlt key.

The shift keys have the following effects:

Ctrl Key
- When creating a selection, it removes from the existing selection
- Change to horizontal scrolling when using mouse wheel if MouseWheelParams.Action = iemwVScroll
- When using cursor keys it sizes the selection or layer (instead of moving it)
- When editing layer points (mlEditLayerPoints), it removes the point being clicked

Shift Key
- When creating a selection, it adds to the existing selection (EnableShiftKey)
- When selecting layers, it adds the selected layer to the multiple selection
- When using cursor keys to move or size the selection or layer, it increases the movement by 10x
- When rotating using miRotateTool it forces 45 deg. increments (or MouseRotateShiftStep)
- When rotating a layer it forces 45 deg. angles (or LayersRotateStep)
- When drawing a TIELineLayer, TIEPolylineLayer or TIEAngleLayer it forces lines at 45 deg. angles (or LayersRotateStep)
- When rotating the Crop Tool miCropTool it forces 15 deg. increments)
- When creating a curve using the Alt key and mlEditLayerPoints, the curve will be a perfect half-circle
- When filling using miColorFill or miAlphaFill it enables MaxFilter and increases the color tolerance

Alt Key
- When editing layer points (mlEditLayerPoints), it converts the line being dragged into a curve
- When creating/sizing a selection it forces a perfect square/circular selection
- When creating/sizing a layer it maintains the aspect ratio

Use ShiftKeyLock to force any of these behaviours:
Value Description
iessCtrl_SubFromSel When creating a selection, it remove from the existing selection
iessCtrl_InvertWheel Change to horizontal scrolling when using the mouse wheel
iessCtrl_KeySizing When using cursor keys it sizes the selection or layer (instead of moving it)
iessCtrl_DelPoint When editing layer points (mlEditLayerPoints), it removes the point being clicked
iessShift_AddToSel When creating a selection, it adds to the existing selection
iessShift_AddLyrSel When selecting layers, it adds the selected layer to the multiple selection
iessShift_FastMove When using cursor keys to move or size the selection or layer, it increases the movement by 10x
iessShift_RotateLock When rotating images, layers or crop selections it forces 45 deg. increments
iessShift_LineLock When drawing a TIELineLayer, TIEPolylineLayer or TIEAngleLayer it forces 45 deg. angles
iessShift_CircularCurve When creating a curve using the Alt key and mlEditLayerPoints, the curve will be a perfect half-circle
iessShift_MoveSnapping When drawing with a brush, movement is snapped along axes
iessAlt_Curve When editing layer points, it converts the line being dragged into a curve
iessAlt_MaintainAR When creating/sizing a selection or layer it maintains the aspect ratio


Default: []


Example


// Force selections to add to existing ones
ImageEnView1.ShiftKeyLock := [ iessShift_AddToSel ];

// Force 45 deg angles for lines, and perfectly square or circular selections
ImageEnView1.ShiftKeyLock := [ iessShift_RotateLock, iessAlt_MaintainAR ];

// Select whole image and allow user to deselect circular regions
With ImageEnView1 do
begin
  SelectionBase := iesbBitmap;
  Select( 0, 0, IEBitmap.Width, IEBitmap.Height );
  ShiftKeyLock := [ iessCtrl_SubFromSel ];
  MouseInteractGeneral := [ miSelectCircle ];
end;


See Also


- KeyboardShortcuts