Src... example for C++ 5.0 and later
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.
m_LEADRasterView1.SetAutoSetRects(FALSE);
if (m_LEADRasterView1.GetSrcWidth() > 1 && m_LEADRasterView1.GetSrcHeight() > 1)
{
m_LEADRasterView1.SetSrcWidth(m_LEADRasterView1.GetSrcWidth() * 0.9f);
m_LEADRasterView1.SetSrcHeight(m_LEADRasterView1.GetSrcHeight() * 0.9f);
m_LEADRasterView1.SetSrcTop((m_LEADRasterView1.GetRaster().GetBitmapHeight() - m_LEADRasterView1.GetSrcHeight()) / 2);
m_LEADRasterView1.SetSrcLeft((m_LEADRasterView1.GetRaster().GetBitmapWidth() - m_LEADRasterView1.GetSrcWidth()) / 2);
}
// Set the clipping area to the same as the destination rectangle
m_LEADRasterView1.SetSrcClipWidth(m_LEADRasterView1.GetSrcWidth());
m_LEADRasterView1.SetSrcClipHeight(m_LEADRasterView1.GetSrcHeight());
m_LEADRasterView1.SetSrcClipTop(m_LEADRasterView1.GetSrcTop());
m_LEADRasterView1.SetSrcClipLeft(m_LEADRasterView1.GetSrcLeft());
// Redisplay the image
m_LEADRasterView1.ForceRepaint();