Appendix A: System Routines — Graphing
607
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
GrClipLine
Declaration:
BYTE
GrClipLine
(BCD16
x1
, BCD16
y1
, BCD16
x2
, BCD16
y2
,
BCD16 *
nx1
, BCD16 *
ny1
, BCD16 *
nx2
, BCD16 *
ny2
,
GR_WIN_VARS *
grPtr
)
Category(ies):
Graphing
Description:
Clip a line to the given graph window.
Inputs:
x1, y1, x2, y2
— End-points of line to clip.
grPtr
— Graph window structure (
gr_active
,
gr_other
) defining
window to clip to.
Outputs:
Return 1 if output line (
nx1
,
ny1
,
nx2
,
ny2
) is valid and
x2
,
y2
was on
screen.
Return a value > 1 if output line was valid and
x2
,
y2
was off screen.
Return 0 if the line is outside the specified window region.
nx1, ny1, nx2, ny2
— End-points of the line after it has been clipped to
the given graph window.
Assumptions:
Assumes an x, y coordinate system, even in 3D mode so should not be
used for 3D graphing.
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also: GrLineFlt
(continued)