File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scrolling graphics

 
Jerry Timwell
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I need help...
How would you scroll on an image, for example, a 400x400 view on a 1000x1000 picture, or, how to scroll any other way.

Thanks.
 
Stuart Gray
Ranch Hand
Posts: 410
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends. If you are wanting to draw just a 'normal' picture (like a JPEG or something), then drawing at negative coordinates might be enough (e.g. drawing at (-100, -100) will show you a section of the picture from (100, 100) to (500, 500). But be aware that on some PCs this kind of drawing (where the image is bigger than the screen) can be VERY slow. Not on all, just certain graphics setups.

If, however, you want background for a 2D game (something like Xevious or many platform games) you will need to look into using a tilemap.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic