CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Bitmap

  1. #1
    Guest

    Bitmap

    I have created a bitmap. Now I have to give the facility to zoom the bitmap by 200% or 400% as the user desires.It's very much like mspaint. Please tell me how to do it.


  2. #2
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    100

    Re: Bitmap

    Will StretchBlt() function help?

    Good luck with Painting!!

    Walter An


  3. #3
    Join Date
    May 1999
    Posts
    123

    Re: Bitmap

    You've got a couple of options. One is to use StretchBlt to draw the bitmap, specifying a target area twice as wide and twice as wide as the original area (or, of course, 4 times in each direction to do 400%).

    If this is an editing program, you'll want to be able to know which of the original pixels the user is clicking on. In that case, you may prefer to do the zooming by changing the mapping mode. This way, when the user clicks on the display, you can easily convert from the point on the display to a coordinate in the original bitmap using DPtoLP.


    The universe is a figment of its own imagination.

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