Dst... example for C++ 4.0 and later

This example uses the destination rectangle properties to zoom in on an image.

// Calculate the values to zoom in by 10 percent and center the image.
m_Lead1.SetDstWidth(m_Lead1.GetDstWidth() * 1.1f);
m_Lead1.SetDstHeight(m_Lead1.GetDstHeight() * 1.1f);
m_Lead1.SetDstTop((m_Lead1.GetScaleHeight() - m_Lead1.GetDstHeight()) / 2);
m_Lead1.SetDstLeft((m_Lead1.GetScaleWidth() - m_Lead1.GetDstWidth()) / 2);
// Set the clipping area to the same as the destination rectangle
m_Lead1.SetDstClipWidth(m_Lead1.GetDstWidth());
m_Lead1.SetDstClipHeight(m_Lead1.GetDstHeight());
m_Lead1.SetDstClipTop(m_Lead1.GetDstTop());
m_Lead1.SetDstClipLeft(m_Lead1.GetDstLeft());
// Redisplay the image
m_Lead1.ForceRepaint();