SetSrcClipRect example for C++ Builder
This example crops the image by reducing the source clipping area and repaints the image.
float NewLeft, NewTop, NewWidth, NewHeight;
NewLeft = LEADRasterView1->SrcClipLeft + (LEADRasterView1->SrcClipWidth * 0.1);
NewTop = LEADRasterView1->SrcClipTop + (LEADRasterView1->SrcClipHeight * 0.1);
NewWidth = LEADRasterView1->SrcClipWidth * 0.8;
NewHeight = LEADRasterView1->SrcClipHeight * 0.8;
if ((NewWidth > 1) && (NewHeight >1))
LEADRasterView1->SetSrcClipRect (NewLeft, NewTop, NewWidth, NewHeight);
LEADRasterView1->ForceRepaint ();