Declaration
property ClientAreaBox: TRect;
Description
Returns the drawing area of the layer. The coordinates are relative to the component client area.
Note: You may need to call Application.ProcessMessages if you do not get a valid value for ClientAreaBox
// Select in background layer the area of layer 1
ImageEnView1.LayersCurrent := 0;
ImageEnView1.SelectionBase := iesbClientArea;
lyr1Rect := ImageEnView1.ClientAreaBox;
ImageEnView1.Select( lyr1Rect.Left, lyr1Rect.Top, lyr1Rect.Right, lyr1Rect.Bottom );
// Set the position of the current layer as it appears in the current view
ImageEnView1.CurrentLayer.ClientAreaBox := Rect( 100, 100, 500, 500 );
ImageEnView1.Update;
// Add an elliptical mask to image layer 2 (i.e. to make the image circular)
ImageEnView1.LayersInsert( 3, iesEllipse );
ImageEnView1.CurrentLayer.FillColor := clBlack;
ImageEnView1.CurrentLayer.ClientAreaBox := ImageEnView1.Layers[2].ClientAreaBox;
ImageEnView1.CurrentLayer.IsMask := True;
ImageEnView1.CurrentLayer.MaskInverted := True;
ImageEnView1.CurrentLayer.Visible := False;
ImageEnView1.Update();
See Also
◼PosX
◼PosY
◼Width
◼Height
◼LayerRect