MImgDrawPattern

Functions ››
Parent Previous Next

bOk = MImgDrawPattern( hImage, hDC, nLeft, nTop, nRight, nBottom, nImgWid, nImgHt, nFlags )

Draws an image pattern in the specified device context.

Parameters
hImage
Number: Handle of the image

hDC
Number: Handle of the device context

nLeft, nTop, nRight, nBottom
Number: Rectangle to fill with the image pattern.

nImgWid, nImgHt
Number: Width / height of the image. Specify -1 to let M!Image determine the width / height.

nFlags
Number: Draw flags

Return
Boolean: TRUE if successful or FALSE if an error occurs

Example
In this example a window is filled with an image pattern:
! Get the DC
Set hDC = GetDC( hWnd )
If hDC
 ! Get the image size
 Call MImgGetSize( hImage, nWidth, nHeight )
 ! Get the client rectangle of the window
 Call GetClientRect( hWnd, nLeft, nTop, nRight, nBottom )
 ! Draw the pattern
 Call MImgDrawPattern( hImage, hDC, nLeft, nTop, nRight, nBottom, nWidth, nHeight, 0 )
 ! Release the DC
 ReleaseDC( hWnd, hDC )


See also
MImgDraw
MImgDrawAligned
MImgSetDrawClipRect
MImgSetDrawState

Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator