MImgSetDrawClipRect
bOk = MImgSetDrawClipRect( hImage, nLeft, nTop, nRight, nBottom )
Sets an image's draw clipping rectangle.
Parameters
hImage
Number: Handle of the image
nLeft, nTop, nRight, nBottom
Number: The clipping rectangle
Return
Boolean: TRUE if successful or FALSE if an error occurs
Example
In this example an image is drawn into a window. The update rectangle is used for clipping:
! Get the DC
Set hDC = GetDC( hWnd )
If hDC
! Get the client rectangle of the window
Call GetClientRect( hWnd, nLeft, nTop, nRight, nBottom )
! Get the update rectangle
Call GetUpdateRect( hWnd, nClLeft, nClTop, nClRight, nClBottom )
! Set the clipping rectangle
Call MImgSetDrawClipRect( hImage, nClLeft, nClTop, nClRight, nClBottom )
! Draw it using the clipping rectangle
Call MImgDraw( hImage, hDC, nLeft, nTop, nRight, nBottom, MIMG_DRAW_USECLIPRECT )
! Release the DC
ReleaseDC( hWnd, hDC )
See also
MImgGetDrawClipRect
MImgDraw
MImgDrawAligned
MImgDrawPattern
MImgSetDrawState
Created with the Personal Edition of HelpNDoc: News and information about help authoring tools and software