Texas Instruments TI-89 Developer's Manual page 1220

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

1178
WinLineExt
(continued)
Example:
/* This example draws to a window which is clipped. Because of the clipping, the
first part of the first line drawn is clipped (not drawn). After the clipping
region for the window is restored back to the full window; the second line drawn
now draws the entire line. If WinLine was used in these cases the scan-line
conversion used to draw the lines would cause the second line drawn to be slightly
different than the first line and would leave some pixels still turned on. WinLine
clips to the clipping region and then draws the line inside the clipping region.
WinLineExt actually starts drawing at the line end-points and only draws those
pixels inside the clipping region which is why it is slower.
*/
WINDOW w1;
WIN_RECT wr;
SCR_RECT sr, oldClip;
if (WinOpen( &w1, MakeWinRect(0,0,100,80), 0 )) {
WinActivate( &w1 );
WinClr( &w1 );
oldClip = w1.Clip;
SetWinClip( &w1, MakeScrRect(20,20, 80,60,&sr) );
wr = *MakeWinRect(40,0,60,60);
WinLineExt( &w1, &wr );
GKeyIn( NULL, 0 );
w1.Clip = oldClip;
WinAttr( &w1, A_XOR );
WinLineExt( &w1, &wr );
GKeyIn( NULL, 0 );
WinClose( &w1 );
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Windows
/* this will be clipped */
/* draw whole line */
Not for Distribution
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents