supposing i have a really big image.... whats the best way to allow the user to scrool around it?
Printable View
supposing i have a really big image.... whats the best way to allow the user to scrool around it?
I prefer dragging the image much over using scrollbars. (Probably because there's much more room to click than in the narrow scrollbars, and over all because you can "scroll" diagonally.) I have no idea how others think about it.
(For performance issues you might want to only register the mousedown- and mouseup-events, and not dynamically drag the image in the mousemove-event.)
maybe he's talking abt how to handle such a large image in memory and to load the right parts at the right events.
I don't know, he didn't make it clear.
that's what i want to do :D drag the picture around, but how do i go about doing it?Quote:
Originally posted by riis
I prefer dragging the image much over using scrollbars. (Probably because there's much more room to click than in the narrow scrollbars, and over all because you can "scroll" diagonally.) I have no idea how others think about it.
(For performance issues you might want to only register the mousedown- and mouseup-events, and not dynamically drag the image in the mousemove-event.)
maybe u should make it real time if you want to make it fast enuf for gaming. If you specify the right purpose then maybe you could get some help
ok, what i have is this really large image of a technology tree. I just want to be able to allow the user to scroll around the picture by dragging the mouse. What i have in palce now uses scrollbars.
It doesn't need to be *very* fast
Don't have a large image if it's all text. Generate it at run-time and you'll simply be able to offset the individual X and Y positions of the text, pictures, and/or controls you use.
its not all text, there are icons as wellQuote:
Originally posted by Sastraxi
Don't have a large image if it's all text. Generate it at run-time and you'll simply be able to offset the individual X and Y positions of the text, pictures, and/or controls you use.
i think sastraxi is right abt the run-time thing. Even if there are icons, you can hold certain of them in memory and display appropriate ones at the right positions, would be a hell lot faster.