###############################################################################
# #
# Copyright © 1989-1991 by Artificial Horizons®, Inc. All rights reserved. #
# #
# This material constitutes the trade secrets and confidential, #
# proprietary information of Bruce Factor and Curtis Priem, and is #
# under license to Artificial Horizons, Inc. The material is not #
# to be disclosed, reproduced, copied, or used in any manner not #
# permitted under license from Artificial Horizons, Inc. For more #
# information email "ahi-interest@ahi.com". #
# #
###############################################################################
RECTANGLE(3GC) AVIATOR GRAPHICS INTERFACE CLASSES RECTANGLE(3GC)
NAME
FB_CLASS__RECTANGLE_2DS_OVERLAPPING,
FB_CLASS__RECTANGLE_2DS_NONOVERLAPPING - 2D screen rectangle classes
SYNOPSIS
#include <agi.h>
register Fbuffer fbp;
fbstart(fbp, FB_CLASS__RECTANGLE_2DS_OVERLAPPING) {
} fbend(fbp);
fbstart(fbp, FB_CLASS__RECTANGLE_2DS_NONOVERLAPPING) {
} fbend(fbp);
DESCRIPTION
The class FB_CLASS__RECTANGLE_2DS_OVERLAPPING is used for rendering
overlapping rectangles and rectangle meshes in two dimensional screen
coordinates. The rectangle is aligned to the screen and is defined
with just two points. Overlapping rectangles have the characteristic
that two adjacent rectangles using the same two points will overlap by
exactly a line. If two adjacent rectangles are rendered with the
exclusive-OR raster operation, a line connecting the two points in
common will be the original image.
The class FB_CLASS__RECTANGLE_2DS_NONOVERLAPPING is used for rendering
nonoverlapping rectangles and rectangle meshes in two dimensional
screen coordinates. The rectangle is aligned to the screen and is
defined with just two points. Nonoverlapping rectangles have the
characteristic that two adjacent rectangles using the same two points
will have no pixels in common.
MEMBERS
The following public members can be accessed by using routines
fbput(3G) and fbget(3G). These 32 bit numbers can be signed integer,
signed 16.16 fixed point, or IEEE single precision floating point
format. The coordinate (0,0) is the upper left corner of the paint
canvas, or the upper left corner of the frame buffer when running
without a windowing system.
FB_MEMBER__X__INTEGER
FB_MEMBER__X__FIXED
FB_MEMBER__X__FLOAT
X is the horizontal location of the end point of the rectangle
currently being defined.
FB_MEMBER__Y__INTEGER
FB_MEMBER__Y__FIXED
FB_MEMBER__Y__FLOAT
Y is the vertical location of the end point of the rectangle
currently being defined.
FUNCTIONS
The following public functions can be called by using the fbcall(3G)
routine:
FB_FUNCTION__STORE_INCREMENT
The STORE function stores the current point (X and Y) into the
frame buffer. The point reference is then incremented to
reference the next point on the rectangle.
FB_FUNCTION__RENDER
The RENDER function causes the frame buffer to render the
rectangle.
SEE ALSO
fbcall(3G), fbend(3G), fbget(3G), fbput(3G), fbstart(3G)
PERFORMANCE
INTEGER is the fastest format.
When rendering only few rectangles, RECTANGLE_2DS_OVERLAPPING has
less overhead (startup and cleanup costs). Try to use
RECTANGLE_2DS_OVERLAPPING instead of RECTANGLE_2DS_NONOVERLAPPING
when clearing a window or drawing a large polygon.
AGI Release 1.8 Last change: 25 December 1991