Screen Space

Screen space is the most popular and most efficient of Fastgraph's 2D coordinate systems and will be the coordinate system used in just about all the example programs. It can be thought of as a grid of rows and columns, with each unit in the grid representing the smallest addressable unit in a virtual buffer. This quantity is called a pixel, and each pixel is identified by its unique (x,y) integer coordinates. The pixel rows and columns are numbered starting at zero; the origin is always the upper left corner of the virtual buffer. For example, a 640x480 virtual buffer would have horizontal screen space coordinates that range from 0 at the left edge to 639 at the right edge. Similarly, the vertical screen space coordinates would range from 0 at the top edge to 479 at the bottom edge.

The Fastgraph functions fg_getmaxx() and fg_getmaxy() return the maximum x and y screen space coordinates of the active virtual buffer. For a 640x480 virtual buffer, fg_getmaxx() returns 639 and fg_getmaxy() returns 479.

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.