PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Question about continuous surface display?

Hi all,

I'm not sure if this topic was up before but my problem is ...

Say if you got a really long image like 150x1200, is there any way of displaying just the upper part of the image, like the upper 150x300 portion of it? Then by holding keyDown the image will scroll down to the bottom?

I have been playing with setting the mask with no luck (will you use mask anyway?). Any suggestions would be appreciated :)
You can do either:
(a) Use a source rectangle on the source surface to specify what part you want to copy, to give the illusion that the picture is "moving" around,
-or-
(b) you can set a clipper on the destination surface (e.g. the backbuffer), and simply BltFast to wherever you want (including negative coordinates). For example: m_pDisplay->GetBackBuffer()->SetClipper(NULL) sets a clipper on the entire backbuffer.
wow thx johan, that was a quick reply :D

I have tried method B and its working great! and about method A, I am wondering how you can "copy" from one surfance to another?

Sorry if this question is a bit stupid ... I am a newbie in GD :oops:

Thanks heaps!
You use BltFast to copy contents from one surface to the other. For details on BltFast please see the online documentation:
http://www.gapidraw.com/doc/301/doc-surface-frame.htm
thx heaps for now Johan :o