ImageEn, unit iexBitmaps

TIEBitmap.RenderToTIEBitmapEx

TIEBitmap.RenderToTIEBitmapEx


Declaration


procedure RenderToTIEBitmapEx(Dest: TIEBitmap; xDst, yDst, dxDst, dyDst: integer; xSrc, ySrc, dxSrc, dySrc: integer; bEnableAlpha: Boolean = True; Transparency: integer = 255; Filter: TResampleFilter = rfNone; RenderOperation: TIERenderOperation = ielNormal; Opacity: double = 1.0);


Description


Draws the rectangle xSrc, ySrc, dxSrc, dySrc inside the destination rectangle xDst, yDst, dxDst, dyDst of Dest TIEBitmap object.
Dest PixelFormat must be ie24RGB.
bEnableAlpha includes the alpha channel
Transparency specifies the transparency value (0=Fully Transparent to 255=Fully Opaque).
Filter the resampling filter.
RenderOperation the rendering operation.
Opacity specifies the opacity (0=Fully Transparent to 1.0=Fully Opaque).


Opacity vs Transparency


Both the Opacity and Transparency parameters provide the same functionality. Transparency is the traditional ImageEn value, whereas Opacity provides easier PSD compatibility.
While they can be used in combination, generally only one will be used, i.e. leave Opacity=1 and make use of transparency, or alternatively, leave Transparency=255 and make use of Opacity. For example, for 50% opacity: Transparency = 255 and Opacity = 0.5, or Transparency = 128 and Opacity = 1.0




Compatibility Information


In v6.0.0 the bEnableAlpha parameter was added. Set this to true to maintain existing functionality.


Examples


// Render an image in a TImageEnView to a TIEBitmap at half-size
bmp.Allocate( ImageEnView1.IEBitmap.Width div 2, ImageEnView1.IEBitmap.Height div 2 );
ImageEnView1.IEBitmap.RenderToTIEBitmapEx( bmp,
                                           0, 0, bmp.Width, bmp.Height,
                                           0, 0, ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height,
                                           True, 255, rfLanczos3 );

// Merge images of ImageEnView1 and ImageEnView2 using "InverseColorDodge" and put onto ImageEnView3
ImageEnView3.IEBitmap.Assign( ImageEnView2.IEBitmap );
ImageEnView1.IEBitmap.RenderToTIEBitmapEx( ImageEnView3.IEBitmap,
                                           0, 0, ImageEnView2.IEBitmap.Width, ImageEnView2.IEBitmap.Height,
                                           0, 0, ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height,
                                           False, 255, rfNone,
                                           ielInverseColorDodge );
ImageEnView3.Update;


See Also


- RenderToTIEBitmap
- DrawToTIEBitmap