CombineExt example for Visual Basic
'This example copies the RasterView1 bitmap to RasterView2, trims and filters the copied image, and combines the filtered image with the original Lead1 bitmap image. Trimming RasterView2 lets you see the difference between filtered and nonfiltered regions.
Dim TrimLeft As Single, TrimTop As Single, TrimWidth As Single, TrimHeight As Single
Dim DstLeft As Single, DstTop As Single, DstWidth As Single, DstHeight As Single
Dim SrcLeft As Single, SrcTop As Single
LEADRasterView2.Raster.Bitmap = LEADRasterView1.Raster.Bitmap
TrimLeft = (LEADRasterView2.Raster.BitmapWidth * 0.2)
TrimTop = (LEADRasterView2.Raster.BitmapHeight * 0.2)
TrimWidth = (LEADRasterView2.Raster.BitmapWidth * 0.6)
TrimHeight = (LEADRasterView2.Raster.BitmapHeight * 0.6)
RasterProc.Trim LEADRasterView2.Raster, TrimLeft, TrimTop, TrimWidth, TrimHeight
RasterProc.SpatialFilter LEADRasterView2.Raster, FLT_LINESEG_HORZ
DstLeft = TrimLeft
DstTop = TrimTop
DstWidth = TrimWidth
DstHeight = TrimHeight
SrcLeft = 0
SrcTop = 0
RasterProc.CombineExt LEADRasterView1.Raster, DstLeft, DstTop, DstWidth, DstHeight, LEADRasterView2.Raster, SrcLeft, SrcTop, CB_OP_ADD
LEADRasterView1.ForceRepaint