Declaration
TIELayerMagnification = record
Enabled: boolean;
Rate: double;
Style: TIEMagnifyStyle;
Source: TIEMagnifySource;
end;
Description
Properties allowing a layer to be used for magnification.
Field | Description | Default |
Enabled | If true this is a magnify layer. The bitmap of the layer is filled with the background zoomed according to Rate field | False |
Rate | The rate of the magnify layer (magnification), e.g. 10 would be 10x magnification. Value must be >1 | 2 |
Style | The magnify layer shape | iemRectangle |
Source | The magnify layer source | iemCanvas |
Note:
◼Magnification properties have no effect on the background layer (Layer 0), and only apply when the Magnify.Enabled = True
◼Use
ResampleFilter to specify the quality/smoothing of the magnification
| Demos\Display\Magnify2\Magnify2.dpr |
// Add a round magnification layer to the image
// Create our Magnify layer
ImageEnView1.LayersAdd( ielkImage );
magLayer := TIEImageLayer( ImageEnView1.CurrentLayers );
magLayer.Width := 200;
magLayer.Height := 200;
magLayer.VisibleBox := False; // Hide border
magLayer.Magnify.Style := iemEllipse;
magLayer.Magnify.Rate := 10; // 10x magnification
magLayer.Magnify.Source := iemBackgroundLayer;
magLayer.Magnify.Enabled := true;
magLayer.Transparency := 200; // 20% transparent
magLayer.UseResampleFilter := True;
magLayer.ResampleFilter := rfFastLinear; // Set quality
ImageEnView1.Update();
// Allow magnify layer to be moved and sized
ImageEnView1.MouseInteractLayers := [mlMoveLayers, mlResizeLayers];