This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scrolling graphics

 
Jerry Timwell
Greenhorn
Posts: 1
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic