2003.05.27 15:05 "orientation", by Diana Szleper

2003.05.27 22:12 "Re: orientation", by Jon Saxton

As I understand it, orientation is a display hint, albeit an important one.

In most windowing display systems it is only necessary to set up the destination rectangle correctly before transferring the pixels into the presentation space. Orientation 4 means left-to-right, bottom-to-top which may or may not match your operating system's native display format. Most systems nowadays work in 4th quadrant coordinate space so it probably won't match.

You can either define your source and destination rectangles as

  __________b    c__________
 |          |    |          |
 |  Source  |    |   Dest   |
 |__________|    |__________|
a                            d

(where a. b, c and d are the defining corners), or as the logical complement thereof, namely

a __________      __________d
 |          |    |          |
 |  Source  |    |   Dest   |
 |__________|    |__________|
             b  c

and the pixel transfer function will take care of the orientation on your behalf. This is a useful technique which is often overlooked.

Jon Saxton <js@triton.vg>
Developer of cross-platform software for UNIX, OS/2 and Win32
U.S. agent for Triton Technologies International Ltd