V8/usr/man/man9/bitblt.9

Compare this file to the similar file:
Show the results in this format:

.TH BITBLT 9.3
.SH NAME
Code, addr, bitblt, point, rectf, screenswap, segment, texture \- basic jerq graphics functions
.SH SYNOPSIS
.B #include <jerq.h>
.PP
.B typedef int Code;
.br
.B "Code F_STORE, F_XOR, F_OR, F_CLR;
.PP
.B Word *addr(b, p)
.B "Bitmap *b; Point p;
.PP
.B void bitblt(sb, r, db, p, f)
.B "Bitmap *sb, *db; Rectangle r; Point p; Code f;
.PP
.B void point(b, p, f)
.B "Bitmap *b; Point p; Code f;
.PP
.B void rectf(b, r, f)
.B "Bitmap *b; Rectangle r; Code f;
.PP
.B void screenswap(b, r, s)
.B "Bitmap *b; Rectangle r, s;
.PP
.B void segment(b, p, q, f)
.B "Bitmap *b; Point p, q; Code f;
.PP
.B void texture(b, r, t, f)
.B "Bitmap *b; Rectangle r; Texture *t; Code f;
.SH DESCRIPTION
The type
.I Code
defines the constants
passed to the graphics primitives to indicate the Boolean
operation to be performed on the source and destination.
The meanings of a
.I Code
are:
.nf
.IP
F_STORE		target =  source
F_OR			target |= source
F_XOR			target ^= source
F_CLR			target &= ~source
.fi
.PP
In other words, if a
Rectangle
is copied to another place with
.I Code
.IR F_OR ,
the result will be the bitwise
OR of the contents of the source
Rectangle
and the target area.
For operations with no explicit source, such as line drawing,
the source is taken to be an infinite bitmap with zeroes everywhere
except on the object (e.g. line) generated by the operator,
with coordinates aligned with the destination bitmap.
.I F_STORE
is the same as
.I F_OR
for non-rectangular operations.
.PP
.I Addr
returns the address of the Word containing the bit
at Point
.I p
in the Bitmap
.IR b .
.PP
.I Bitblt
(bit-block transfer)
copies the data in Rectangle
.I r
in Bitmap
.I sb
to the congruent Rectangle with
.I origin
.I p
in Bitmap
.IR db .
The nature of the copy is specified by the
.I Code
.IR f .
.PP
.I Point
draws the pixel at location
.I p
in the Bitmap
.I b
according to
.I Code
.IR f .
.PP
.I Screenswap
does an in-place exchange of the on-screen Rectangle
.I s
and the Rectangle
.I r
within the Bitmap
.IR b .
Its action is undefined if
.I r
and
.I s
are not congruent.
The Rectangle
.I s
is
.I
not
clipped to
the Bitmap
.IR b ,
only to the screen.
.PP
.I Segment
draws a line segment in Bitmap
.I b
from Point
.I p
to
.IR q ,
with
.I Code
.IR f .
The segment is half-open:
.I p
is the first point of the segment and
.I q
is the first point beyond the segment,
so adjacent segments sharing endpoints abut.
Like all the other graphics operations,
.I segment
clips the line so that only the portion of the line intersecting the
bitmap is displayed.
.PP
.I Texture
draws with function specified by
.I f
in the Rectangle
.IR r ,
in the Bitmap
.IR b ,
the
Texture specified by
.IR t .
The texture is replicated to cover
.IR r .
.I Rectf
is equivalent to
.I texture
with
.I *t
set to all one's.
.PP
In the above definitions, the type Bitmap may
be replaced with Layer anywhere; see
.IR newlayer (9.2).
.SH SEE ALSO
types(9.5)