• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scrolling graphics

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic