SetSrcClipRect example for C++ 5.0 and later
This example crops the image by reducing the source clipping area and repaints the image.
float NewLeft = m_LEADRasterView1.GetSrcClipLeft() + (m_LEADRasterView1.GetSrcClipWidth() * 0.1f);
float NewTop = m_LEADRasterView1.GetSrcClipTop() + (m_LEADRasterView1.GetSrcClipHeight() * 0.1f);
float NewWidth = m_LEADRasterView1.GetSrcClipWidth() * 0.8f;
float NewHeight = m_LEADRasterView1.GetSrcClipHeight() * 0.8f;
if (NewWidth > 1 && NewHeight > 1)
m_LEADRasterView1.SetSrcClipRect(NewLeft, NewTop, NewWidth, NewHeight);
m_LEADRasterView1.ForceRepaint();