*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: types | Section: 9 | Source: UNIX v10 | File: types.9
TYPES(9.5) TYPES(9.5) NAME Word, Point, Rectangle, Bitmap, Texture, Pt, Rect, Rpt, display, Drect, Jrect - graphics data types SYNOPSIS #include <jerq.h> typedef int Word; typedef struct Point Point; typedef struct Rectangle Rectangle; typedef struct Bitmap Bitmap; typedef struct Texture Texture; extern Bitmap display; extern Rectangle Drect, Jrect; Point Pt(x, y) int x, y; Rectangle Rect(x0, y0, x1, y1) int x0, y0, x1, y1; Rectangle Rpt() Point p0, p1; DESCRIPTION A Word is a 32-bit integer, and is the unit of storage used in the graphics software. A Point is a location in a Bitmap (see below), such as the display, and is defined as: typedef struct Point { short x; short y; } Point; The coordinate system has x increasing to the right and y increasing down. All objects and operators in the graphics world live in the same coordinate space--that of the display bitmap. A Rectangle is a rectangular area in a Bitmap. typedef struct Rectangle { Point origin; /* upper left */ Point corner; /* lower right */ } Rectangle; By definition, origin.x <= corner.x and origin.y <= corner.y. By con- vention, the right (maximum x) and bottom (maximum y) edges are ex- cluded from the represented rectangle, so abutting rectangles have no points in common. Thus, corner contains the coordinates of the first point beyond the rectangle. The image on the display is contained in the Rectangle {0, 0, XMAX, YMAX}, where XMAX=800 and YMAX=1024. A Bitmap holds a rectangular image, stored in contiguous memory start- ing at base. typedef struct Bitmap { Word *base; /* pointer to start of data */ unsigned width; /* width in Words of total data area */ Rectangle rect; /* rectangle in data area, screen coords */ } Bitmap; Each width Words of memory form a scan-line of the image, and rect de- fines the coordinate system inside the Bitmap: rect.origin is the loca- tion in the Bitmap of the upper-leftmost point in the image. The coor- dinate system is arranged so x positions equal to 0 mod 32 are in the leftmost bit of a Word. A Texture is a 16x16 dot bit pattern. typedef struct { Word bits[16]; } Texture; Textures are aligned to absolute display positions, so adjacent areas colored with the same Texture mesh smoothly. The functions Pt, Rect and Rpt construct geometrical data types from their components. Since they are implemented as macros, they only work in function argument lists. The global display is a Bitmap describing the display area of the process. Drect is a Rectangle defining, in screen coordinates, the display area available to the program (inside the layer's border). Jrect is the Rectangle {0, 0, XMAX, YMAX}. TYPES(9.5)

Navigation Options