I am using a TImageEnVect component with three layers: 0 - a bitmap image 1 - rectangle objects to specify a region (ROI) 2 - vectorial objects (results of image processing)
The user should be able to move/resize the objects on layer 1. But it seems that only objects on the topmost layer are selectable by mouse. Is there a way to allow users to move/resize objects on some non-top layer? Or is the only solution to bring the layer to the front?
There are two properties that control how objects are created with respect to layers. ObjAnchorToLayers and ObjLayer.
TImageEnVect.ObjAnchorToLayers
Declaration property ObjAnchorToLayers:boolean;
Description When true (default), all objects are anchored to a layer (using ObjLayer property). Otherwise (the old behavior) objects are just painted over all layers.
Description Specifies layer index where the object is located (drawn and referenced). Default is "0" and means draw on layer 0.
To select an object on any layer set ObjAnchorToLayers := False.
If ObjAnchorToLayers is true (default) and you set the ObjLayer when you create the object the object will be constrained to the layer and can only be selected when the layer is selected. ImageEnVect1.ObjLayer[ihObj] := ImageEnVect1.LayersCurrent;