PocketMatrix forums

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

about the pitch stuff gapi returns

hi folks,

i am new on here so hi everyone!
as i am also new to ce-coding, especially gapi,
it would be great if someone could explain why to use the cx/ypitch like:
<b>(x * xpitch) + (y * ypitch)</b>,
instead of using:
<b>(y * width) + x</b>
to return one single pixel on screen.

the last one works as fine on the emulator, as it does on my loox.

is there a need to involve the pitch?(i guess there is one) :/

thx for some answer and thx for this well done info-pool :).
It depends on the origin of the display. For most current Pocket PCs, the origin is the top left of the screen. For some devices, like the first generation iPaqs, the origin is the bottom left of the screen, and the pixels progress upward - the display is actually natively landscape.

Dan East
Also, the frame buffer is not always linear.

I seem to remember the old Casio's had this.