Results 1 to 7 of 7

Thread: any controls for zoom in zoom out and can copy area selected or draw or move in image

Threaded View

  1. #4
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: any controls for zoom in zoom out and can copy area selected or draw or move in i

    Dim dHRatio As Double
    Dim dVRatio As Double
    Dim dRatio As Double
    srcW = iSrc.Width
    srcH = iSrc.Height
    dHRatio = dstW / srcW
    dVRatio = dstH / srcH

    If dHRatio > dVRatio Then
    dRatio = dVRatio
    Else
    dRatio = dHRatio
    End If
    SetStretchBltMode iDst.hDC, 4 'STRETCH_HALFTONE
    '// Draw it
    lRet = StretchDIBits(iDst.hDC, dstX, dstY, srcW * dRatio, srcH * dRatio, SrcX, SrcY, srcW, srcH, tBM.Bits(0, -2, -2), tBM, DIB_RGB_COLORS, SRCCOPY)


    you can search GdipDrawImageRectRectI
    Last edited by xxdoc123; Feb 11th, 2018 at 01:20 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width