Available in the LEADTOOLS Imaging toolkit. |
SetSrcClipRect example for Visual Basic
This example crops the image by reducing the source clipping area and repaints the image.
' Declare local variables
Dim NewLeft, NewTop, NewWidth, NewHeight
NewLeft = Lead1.SrcClipLeft+ (Lead1.SrcClipWidth * 0.1)
NewTop = Lead1.SrcClipTop + (Lead1.SrcClipHeight * 0.1)
NewWidth = Lead1.SrcClipWidth * 0.8
NewHeight = Lead1.SrcClipHeight * 0.8
If (NewWidth > 1) AND (NewHeight >1) Then
Lead1.SetSrcClipRect NewLeft, NewTop, NewWidth, NewHeight
End If
Lead1.ForceRepaint