Re: How to scroll over An Image

"T" <[email protected]> Fri, 14 Nov 2003 11:50:02 +1100
Newsgroups gmane.comp.games.mobile
Message-ID <[email protected]>
------=_NextPart_000_0052_01C3AAA5.72079090
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

My limited experience is you define a floating rectangle the size of your d=
isplay viewport and move it over the top of an offscreen buffer that contai=
ns your big image.  Each time you update your display you blit the area of =
the big image that is underneath the floating rectangle to the screen.  Thi=
s gives the illusion of movement.  If your big image is really big then you=
 might get into trouble with having it loaded into memory on low memory har=
dware.

A more complicated way to handle the problem is to break your big image int=
o smaller ones.  Then you load/unload small images from memory, only having=
 a few in memory at any one time (eg. 4).  The 4 you keep in memory are the=
 ones that coincide with the location of the floating rectangle.  When your=
 floating rectangles border crosses the borders of your smaller images you =
will have to blit pieces of each small image to the display viewport.  A li=
ttle more work, but you could reduce your memory footprint substantially.

Hope this helps.


Ty
  "patil_java" <[email protected]> wrote in message news:2003041109=
[email protected]...


  Hi all,

  I was just wondering how to scroll an backgroud Image so that we get an f=
eeling of we are moving.

  And also I am not looking at just rolling over same segment like falling =
stars etc where we put that in loop but actully what I am looking is moving=
 over an Big Image.



  Thanxz

  Chandu



---------------------------------------------------------------------------=
---
  Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.=
com
  Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
  Bid for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://a=
irsahara.indiatimes.com and Bid Now !=20

  To unsubscribe from this group, send an email to:
  [email protected]



  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.=20

------=_NextPart_000_0052_01C3AAA5.72079090
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>


<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My limited experience is you&nbsp;define 
a&nbsp;floating rectangle the size of your display viewport and move it over the 
top of an offscreen buffer that contains your big image.&nbsp; Each time you 
update your display you blit the&nbsp;area of the big image&nbsp;that is 
underneath the&nbsp;floating rectangle to the screen.&nbsp; This gives the 
illusion of movement.&nbsp; If your big image is really big then you might get 
into trouble with having it loaded into memory on low memory 
hardware.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>A more complicated way to handle the problem is to 
break your big image into smaller ones.&nbsp; Then you load/unload small images 
from memory,&nbsp;only having a few in memory at any one time (eg. 4).&nbsp; The 
4 you keep in memory are the ones that coincide with the location of the 
floating rectangle.&nbsp; When your floating rectangles border&nbsp;crosses the 
borders of your smaller images you will have to blit pieces of each small image 
to the display viewport.&nbsp; A little more work, but you could reduce your 
memory footprint substantially.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hope this helps.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Ty</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>"patil_java" &lt;<A 
  href="mailto:[email protected]">[email protected]</A>&gt; 
  wrote in message <A 
  href="news:[email protected]">news:[email protected]</A>...</DIV><BR>
  <P>Hi all,</P>
  <P>I was just wondering how to scroll an backgroud Image so that we get an 
  feeling of we are moving.</P>
  <P>And also I am not looking at just rolling over same segment like falling 
  stars etc where we put that in loop but actully what I am looking is moving 
  over an Big Image.</P>
  <P><FONT face=Arial size=2></FONT>&nbsp;</P>
  <P>Thanxz</P>
  <P>Chandu<BR></P>
  <HR>
  <FONT face=Arial size=2><B>Get Your Private, Free E-mail from Indiatimes at 
  </FONT><A href="http://email.indiatimes.com"><FONT face=Arial 
  size=2>http://email.indiatimes.com</A></B><BR>Buy The Best In <B>BOOKS</B> at 
  <A 
  href="http://www.bestsellers.indiatimes.com">http://www.bestsellers.indiatimes.com</A><BR>Bid 
  for <B>Air Tickets @ Re.1</B> on Air Sahara Flights. Just log on to <A 
  href="http://airsahara.indiatimes.com">http://airsahara.indiatimes.com</A> and 
  Bid Now !</FONT> <BR><BR><TT>To unsubscribe from this group, send an email 
  to:<BR>[email protected]<BR><BR></TT><BR><BR><TT>Your use 
  of Yahoo! Groups is subject to the <A 
  href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</A>.</TT> 
<BR></BLOCKQUOTE>
<br>



<br>
<tt>
To unsubscribe from this group, send an email to:<BR>
[email protected]<BR>
<BR>
</tt>
<br>

<br>
<tt>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</a>.</tt>
</br>

</BODY></HTML>

------=_NextPart_000_0052_01C3AAA5.72079090--