Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 16th, 2005, 9:00 PM   #1
Hektik
Newbie
 
Join Date: Mar 2005
Posts: 2
Rep Power: 0 Hektik is on a distinguished road
Image Panning

I'm trying to create a simple program to read manga (japanese comics.) I'm pretty much done with the loading images from zip, mouse navigation, etc. The only thing I can't figure out is how to pan the images. Usually, the images are too tall to fit on the screen, so I want to make a function where, when I click and hold the mouse button, the image pans according to the mouse movements. Anyone know how this can be done? Or know of a website that explains it? It's driving me crazy :mad: please help. Thanks.
Hektik is offline   Reply With Quote
Old Mar 19th, 2005, 9:14 AM   #2
Hektik
Newbie
 
Join Date: Mar 2005
Posts: 2
Rep Power: 0 Hektik is on a distinguished road
Bump
Hektik is offline   Reply With Quote
Old Mar 19th, 2005, 9:18 AM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
-itty bump-itty...
__________________

tempest is offline   Reply With Quote
Old Mar 19th, 2005, 5:25 PM   #4
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Umm, this is a bit more complex of an issue, and if you are not dealing with bitmap files or any other decoded bitmap format than you are going to want to find a rendering/image handling library that will do this for you.

Easiest way, copy the entire image onto a memory "surface" and use BitBlt to copy from that memory surface (which is not drawn to screen) to a memory surface that represents the drawing area on the screen... the BitBlt function in Windows will allow you to copy only fragments of the image and resize the image as well when used correctly.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:46 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC