|ImageEn, unit imageenview
Declarationprocedure LayersDrawTo(Destination: TIEBitmap; AdjustBitmap: Boolean = True);
Merges all layers and draws the result to Destination
This function should replace a sequence of LayersMerge
calls. The destination bitmap will not have a transparency channel.
is true the Destination
bitmap will be sized to display all layers.
Note: To draw a single layer, use TIELayer.CopyToBitmap
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.
Example// draws all layers of ImageEnView1 to ImageEnView2
ImageEnView1.LayersDrawTo( ImageEnView2.IEBitmap );