Available in the LEADTOOLS Imaging toolkit. |
Src... example for Access 2.0
This example uses the source rectangle properties to zoom in on the image.
'Calculate the values to zoom in by 10 percent and center the image.
If (Me![LEAD1].Object.SrcWidth > 1) And (Me![LEAD1].Object.SrcHeight > 1) Then
Me![LEAD1].Object.SrcWidth = Me![LEAD1].Object.SrcWidth * 0.9
Me![LEAD1].Object.SrcHeight = Me![LEAD1].Object.SrcHeight * 0.9
Me![LEAD1].Object.SrcTop = (Me![LEAD1].Object.BitmapHeight - Me![LEAD1].Object.SrcHeight) / 2
Me![LEAD1].Object.SrcLeft = (Me![LEAD1].Object.BitmapWidth - Me![LEAD1].Object.SrcWidth) / 2
End If
'Set the clipping area to the same as the destination rectangle
Me![LEAD1].Object.SrcClipWidth = Me![LEAD1].Object.SrcWidth
Me![LEAD1].Object.SrcClipHeight = Me![LEAD1].Object.SrcHeight
Me![LEAD1].Object.SrcClipTop = Me![LEAD1].Object.SrcTop
Me![LEAD1].Object.SrcClipLeft = Me![LEAD1].Object.SrcLeft
'Redisplay the image
Me![LEAD1].Object.ForceRepaint