Next: Color Operations
Up: Graphics
Previous: Basic Commands
A position is the place where a pixel goes in 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)
make-posn takes two integers and returns a position
with the specified x and y coordinates. -
(posn-x p), (posn-y p)
posn-x and posn-y return the x and y
coordinates, respectively, of a position. -
(posn? p)
posn? reports whether its argument is a valid position. -
((get-pixel viewport) p)
get-pixel returns the color of the pixel at position p in
viewport; 0 denotes white and 1 denotes not white.
PLT