![[index]](../icons/index.gif)
Next: Color Operations
Up: Viewport Graphics
Previous: Basic Commands
A position is a pixel location within a viewport. The upper-left
corner is pixel (0, 0) and the orientation of the position
coordinates within a viewport is as follows:
-
(make-posn x y)
Takes two integers and returns a position
with the specified x and y coordinates.
-
(posn-x p), (posn-y p)
Return the x and y coordinates, respectively, of a position.
-
(posn? v)
Reports whether v is a position.
-
((get-pixel viewport) p)
Returns the color of the pixel at position p in viewport;
0 denotes white and 1 denotes not white.
-
((get-color-pixel viewport) p)
Returns an RGB value for color of the pixel at position p in
viewport.
-
((test-pixel viewport) color)
Returns the color that will actually be used if color is used
to draw.
PLT