title: How to create a pan from composite image in Delphi
body: <p>I'm kind of new to delphi graphics methods and I'm stucked at creating a ... viewport , thats how I call it while i was doing it for a project. I'm sorry I can't provide any code for it but I'm stuck at the logic part , searching google pointed me to some OnPaint , Draw methods. But those are not what I'm trying to accomplish, since I have , for example:</p>
  
  <ol>
  <li>A 1600x1000 background image anchored to the client's top/bottom/right and left.</li>
  <li>Multiple TImage elements placed at set x/y coords.</li>
  <li>A "hotspot" like a map element in HTML where I can set the clickable areas (for the images i'm placing at step 2)</li>
  <li>No zoom needed.</li>
  <li>And the most important thing, while the background is dragged, those TImages placed on top of the background need to be dragged too.</li>
  </ol>
  
  <p>My logic (in HTML/jQuery) was to create a #viewportBinder (which was the div i was dragging, transparent bg), followed by another div inside it called #viewtown (1600x1000, the background) which contains the divs (those TImages) placed at set coordinates in CSS.</p>
  
  <p>So when I am dragging the viewportBinder, jQuery sets the new x/y on the #viewport. Implicitly, the divs (TImages) inside the #viewport are moving because the parent was positioned relative.</p>
  
  <p>Does anybody have any experience with this kind of project ? Any snippet of code ?</p>
  
  <p>To be more specific i'll give you my html example of what i accomplised and what i want to port into Delphi code: <a href="http://www.youtube.com/watch?v=9iYqzvZFnGA">http://www.youtube.com/watch?v=9iYqzvZFnGA</a></p>
  
  <p>Sorry if i'm not clear enough, i have no starting point since I have no experience with this in delphi at all. (using RAD Studio 2010)</p>