Results 1 to 6 of 6

Thread: Zoom in/out

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    Canada
    Posts
    1

    Zoom in/out

    Hi,

    I'm using a picture box/image box combination with vertical and horizontal scroll bars for opening and scrolling through a bitmap. I use the picture box and a mousedown event for digitizing coordinates. Problems are coming up when I want to zoom into a bitmap. The scrollbars have a limitted size and when the bitmap becomes too wide/height, I can't scroll any further. Any suggestions for zooming in/out and keeping the internal coordinate system for a mousedown event ??

    Harry

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    I think you would need to change the max or min value on the scrollbars according to your zoom factor, but I really don't know how you programmed it so I can't know.

    keeping the system could be archieved by getting the offset (scrollbar.value) multiplying this value with the zoomfactor (or not depending on how you managed that before) + the x or y value you get from the mouse down event and depending on what you really want to archieve taking this times the zoomfactor too.

    hope that was any clear
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Just show the visible surface of the zoomed image instead of the whole zoomed image, you will also save a lot of memory resources!

  4. #4
    New Member
    Join Date
    Feb 2002
    Posts
    1

    Zoom

    I have the same proble but i don't know how can i make zoom to a zone of the picture loaded in a picturebox control. Haw can i do that, please?



    Originally posted by /\/\isanThr0p
    I think you would need to change the max or min value on the scrollbars according to your zoom factor, but I really don't know how you programmed it so I can't know.

    keeping the system could be archieved by getting the offset (scrollbar.value) multiplying this value with the zoomfactor (or not depending on how you managed that before) + the x or y value you get from the mouse down event and depending on what you really want to archieve taking this times the zoomfactor too.

    hope that was any clear

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    hm I am sorry, but I don't understand your question.
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Simple: using PaintPicture or BitBlt/StretchBlt

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