CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    5

    Picture Rotation

    Is there anyway to rotate a picture (image1) without using DLL and all these other calls. All I want to do is rotate the picture a little in a few lines of code


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Picture Rotation

    I think that Shree answered this question before. For everything that involved picture - Shree is the MAN.
    angle = 30 * 3.14 / 180
    slope = Tan(angle)
    for j = 0 to Picture1.ScaleHeight
    i = (Picture1.ScaleHeight - j) * slope
    BitBlt Picture2.hDC, i, j, Picture1.ScaleWidth, 1, Picture1.hDC, 0, j, vbSrcCopy
    next
    Picture2.Refresh


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured