Texas Instruments TI89 Developer Guide - Page 1220
WinLineExt
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1220 highlights
1178 Appendix A: System Routines - Windows 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 ); /* this will be clipped */ GKeyIn( NULL, 0 ); w1.Clip = oldClip; WinAttr( &w1, A_XOR ); WinLineExt( &w1, &wr ); /* draw whole line */ GKeyIn( NULL, 0 ); WinClose( &w1 ); } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1220.png)