Public Sub BuildBitmap(iPicture As Bitmap, iPicture2 As Bitmap) As Bitmap
Dim exDraw As ABExtDrawing
Dim xBuildPicture As Bitmap
Dim xBuildCanvas As Canvas
xBuildPicture.InitializeMutable(iPicture.Width, iPicture.Height)
xBuildCanvas.Initialize2(xBuildPicture)
Dim paint As ABPaint
paint.Initialize
paint.setDither(True)
paint.setAntiAlias(True)
paint.setFilterBitmap(True)
Dim d As Rect
d.Initialize(0,0,iPicture.Width, iPicture.Height)
exDraw.drawBitmap(xBuildCanvas, iPicture, Null, d, paint)
paint.SetPorterDuffXfermode(paint.PorterDuffMode_SRC_IN)
exDraw.drawBitmap(xBuildCanvas, iPicture2, Null, d, paint)
Return xBuildPicture
End Sub