###############################################################################
# #
# 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". #
# #
###############################################################################
CLIP(3GC) AVIATOR GRAPHICS INTERFACE CLASSES CLIP(3GC)
NAME
FB_CLASS__CLIP_2DS - clip class
SYNOPSIS
#include <agi.h>
register Fbuffer fbp;
fbstart(fbp, FB_CLASS__CLIP_2DS) {
} fbend(fbp);
DESCRIPTION
The class FB_CLASS__CLIP_2DS is used for getting the current clip
outline of the locked paint canvas from the windowing system or is
used for creating a user defined clip outline.
The clip list for the current paint canvas can be read from the
windowing system using the WINDOW members. If the user needs to
modify the clip list, a new clip list can be created by setting the
USER members using fbput(3G). Class CLIP_2DS must be used between an
fblock(3G) and fbunlock(3G). The clip outline is obtained from the
windowing system for the paint canvas locked by fblock(3G). If no
CLIP_2DS is used, AGI will automatically use the clip list provided by
the windowing system.
When running without a windowing system, the raw dimensions of the
frame buffer are returned by WINDOW members. This is usually larger
than the area displayed on the screen.
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 origin coordinate (0,0) is the upper left corner of the
frame buffer.
FB_MEMBER__WINDOW_INDEX__INTEGER
FB_MEMBER__WINDOW_INDEX__FIXED
FB_MEMBER__WINDOW_INDEX__FLOAT
WINDOW_INDEX is the index to the clip rectangle which is
currently being gotten from the windowing system.
FB_MEMBER__USER_SIZE__INTEGER
FB_MEMBER__USER_SIZE__FIXED
FB_MEMBER__USER_SIZE__FLOAT
USER_SIZE is the number of clip rectangles that make up the
clip outline.
FB_MEMBER__USER_INDEX__INTEGER
FB_MEMBER__USER_INDEX__FIXED
FB_MEMBER__USER_INDEX__FLOAT
USER_INDEX is the index to the clip rectangle which is
currently being defined by the user.
FB_MEMBER__USER_VISIBLE__CADDR
USER_VISIBLE is a character pointer to the visible section of
the dumb frame buffer or memory raster. This pointer is used
when the rendering is not accelerated.
FB_MEMBER__USER_HIDDEN__CADDR
USER_HIDDEN is a character pointer to the hidden section of
the dumb frame buffer or memory raster. This pointer is used
when the rendering is not accelerated. If this pointer is
NULL, no hidden buffer exists.
FB_MEMBER__USER_PITCH__INTEGER
FB_MEMBER__USER_PITCH__FIXED
FB_MEMBER__USER_PITCH__FLOAT
USER_PITCH is the number of bytes that must be added to the
address of the dumb frame buffer or memory raster to move down
one scan line.
FB_MEMBER__USER_X__INTEGER
FB_MEMBER__USER_X__FIXED
FB_MEMBER__USER_X__FLOAT
USER_X is the horizontal location in the frame buffer where
the origin coordinate (0,0) is located with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
FB_MEMBER__USER_Y__INTEGER
FB_MEMBER__USER_Y__FIXED
FB_MEMBER__USER_Y__FLOAT
USER_Y is the vertical location in the frame buffer where the
origin coordinate (0,0) is located with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
FB_MEMBER__USER_XMIN__INTEGER
FB_MEMBER__USER_XMIN__FIXED
FB_MEMBER__USER_XMIN__FLOAT
USER_XMIN is the left most pixel that will be allowed to be
altered in the frame buffer for rectangle with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
FB_MEMBER__USER_YMIN__INTEGER
FB_MEMBER__USER_YMIN__FIXED
FB_MEMBER__USER_YMIN__FLOAT
USER_YMIN is the top most pixel that will be allowed to be
altered in the frame buffer for rectangle with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
FB_MEMBER__USER_XMAX__INTEGER
FB_MEMBER__USER_XMAX__FIXED
FB_MEMBER__USER_XMAX__FLOAT
USER_XMAX is the right most pixel that will be allowed to be
altered in the frame buffer for rectangle with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
FB_MEMBER__USER_YMAX__INTEGER
FB_MEMBER__USER_YMAX__FIXED
FB_MEMBER__USER_YMAX__FLOAT
USER_YMAX is the bottom most pixel that will be allowed to be
altered in the frame buffer for rectangle with respect to the
USER_VISIBLE/USER_HIDDEN pointers.
The following public members can be accessed by using the routine
fbget(3G). These 32 bit numbers can be signed integer, signed 16.16
fixed point, or IEEE single precision floating point format. The
origin coordinate (0,0) is the upper left corner of the frame buffer.
FB_MEMBER__WINDOW_SIZE__INTEGER
FB_MEMBER__WINDOW_SIZE__FIXED
FB_MEMBER__WINDOW_SIZE__FLOAT
WINDOW_SIZE is the number of clip rectangles that make up the
clip outline of the paint canvas from the windowing system.
FB_MEMBER__WINDOW_VISIBLE__CADDR
WINDOW_VISIBLE is a character pointer to the visible section
of the dumb frame buffer or memory raster. This pointer is
used when the rendering is not accelerated.
FB_MEMBER__WINDOW_HIDDEN__CADDR
WINDOW_HIDDEN is a character pointer to the hidden section of
the dumb frame buffer or memory raster. This pointer is used
when the rendering is not accelerated. If this pointer is
NULL, no hidden buffer exists.
FB_MEMBER__WINDOW_PITCH__INTEGER
FB_MEMBER__WINDOW_PITCH__FIXED
FB_MEMBER__WINDOW_PITCH__FLOAT
WINDOW_PITCH is the number of bytes that must be added to the
address of the dumb frame buffer or memory raster to move down
one scan line.
FB_MEMBER__WINDOW_X__INTEGER
FB_MEMBER__WINDOW_X__FIXED
FB_MEMBER__WINDOW_X__FLOAT
WINDOW_X is the horizontal location in the frame buffer where
the origin coordinate (0,0) is located when rendering into the
paint canvas with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN
pointers.
FB_MEMBER__WINDOW_Y__INTEGER
FB_MEMBER__WINDOW_Y__FIXED
FB_MEMBER__WINDOW_Y__FLOAT
WINDOW_Y is the vertical location in the frame buffer where
the origin coordinate (0,0) is located when rendering into the
paint canvas with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN
pointers.
FB_MEMBER__WINDOW_XMIN__INTEGER
FB_MEMBER__WINDOW_XMIN__FIXED
FB_MEMBER__WINDOW_XMIN__FLOAT
WINDOW_XMIN is the left most pixel which the windowing system
is allowing to altered in the frame buffer for the rectangle
with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN pointers.
FB_MEMBER__WINDOW_YMIN__INTEGER
FB_MEMBER__WINDOW_YMIN__FIXED
FB_MEMBER__WINDOW_YMIN__FLOAT
WINDOW_YMIN is the top most pixel which the windowing system
is allowing to altered in the frame buffer for the rectangle
with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN pointers.
FB_MEMBER__WINDOW_XMAX__INTEGER
FB_MEMBER__WINDOW_XMAX__FIXED
FB_MEMBER__WINDOW_XMAX__FLOAT
WINDOW_XMAX is the right most pixel which the windowing system
is allowing to altered in the frame buffer for the rectangle
with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN pointers.
FB_MEMBER__WINDOW_YMAX__INTEGER
FB_MEMBER__WINDOW_YMAX__FIXED
FB_MEMBER__WINDOW_YMAX__FLOAT
WINDOW_YMAX is the bottom most pixel which the windowing
system is allowing to altered in the frame buffer for the
with respect to the WINDOW_VISIBLE/WINDOW_HIDDEN pointers.
FUNCTIONS
The following public functions can be called by using the fbcall(3G)
routine:
FB_FUNCTION__USER_STORE
The USER_STORE function stores the current USER_INDEX and
USER_SIZE into the frame buffer.
FB_FUNCTION__USER_STORE_INCREMENT
USER_STORE_INCREMENT stores the current clip rectangle
(USER_VISIBLE, USER_HIDDEN, USER_PITCH, USER_X, USER_Y,
USER_XMIN, USER_YMIN, USER_XMAX, USER_YMAX) into the frame
buffer's clip list at the location pointed to by USER_INDEX.
USER_INDEX is then incremented.
FB_FUNCTION__USER_LOAD_INCREMENT
USER_LOAD_INCREMENT loads the clip rectangle in the frame
buffer at the location pointed to by USER_INDEX into the
current user clip rectangle (USER_VISIBLE, USER_HIDDEN,
USER_PITCH, USER_X, USER_Y, USER_XMIN, USER_YMIN, USER_XMAX,
USER_YMAX). USER_INDEX is then incremented.
FB_FUNCTION__WINDOW_STORE
The WINDOW_STORE function stores the current WINDOW_INDEX into
the windowing system.
FB_FUNCTION__WINDOW_LOAD_INCREMENT
WINDOW_LOAD_INCREMENT loads the clip rectangle in the
windowing system at the location pointed to by WINDOW_INDEX
into the current windowing system clip rectangle
(WINDOW_VISIBLE, WINDOW_HIDDEN, WINDOW_PITCH, WINDOW_X,
WINDOW_Y, WINDOW_XMIN, WINDOW_YMIN, WINDOW_XMAX, WINDOW_YMAX).
WINDOW_INDEX is then incremented.
SEE ALSO
fbcall(3G), fbend(3G), fbget(3G), fblock(3G), fbput(3G), fbstart(3G),
fbunlock(3G)
WARNING
If the current clip list is to be changed, the user is responsible for
storing the FB_MEMBER__USER_SIZE into the frame buffer. agipp does
not check for this, because sometimes only the WINDOW information is
read.
PERFORMANCE
INTEGER is the fastest format.
One clip rectangle is the fastest. No clip rectangles (eg. when the
window is iconified or totally hidden) is slow. The user should check
for size of zero, and if detected, not render anything.
If the clip list obtained from the windowing system is not modified,
do not copy it into the user clip list, since AGI will automatically
use the windowing clip list.
AGI Release 1.8 Last change: 25 December 1991