ImageEn, unit imageenview |
|
TImageEnView.LayersDrawTo
Declaration
procedure LayersDrawTo(Destination: TIEBitmap; AdjustBitmap: Boolean = True);
Description
Merges all layers and draws the result to
Destination bitmap.
This function should replace a sequence of
LayersMerge calls. The destination bitmap will not have a transparency channel.
If
AdjustBitmap is true the
Destination bitmap will be sized to display all layers.
Note:
◼To draw a single layer, use
TIELayer.CopyToBitmap◼The
PixelFormat of Destination is expected to be ie24RGB. If not, it will be converted to ie24RGB
LayersDrawTo vs LayersSaveMergedTo
Both LayersDrawTo and LayersSaveMergedTo perform a similar function and generally the result is indistinguishable.
LayersDrawTo is intended for actual rendering (giving an identical result to that seen in the source TimageEnView). It supports all layer options, so should be used for an image that will be saved or printed. Generally, it is faster than LayersSaveMergedTo. It also supports TIEBitmap rendering options, such as Contrast and ChannelOffset. It does not support transparency.
LayersSaveMergedTo creates a copy of layers using Alpha Compositing (the result is equivalent to calling
LayersMerge([]). It is mainly used when transparency needs to be preserved.
// draws all layers of ImageEnView1 to ImageEnView2
ImageEnView1.LayersDrawTo( ImageEnView2.IEBitmap );
ImageEnView2.Update();
See Also
◼LayersSaveMergedTo