WinLineTo Function (ROM Call 0x19)

wingraph.h

void WinLineTo (WINDOW *w, short x, short y);

Draws a line to a window from the current pen position.

WinLineTo draws a line to the window pointed to by w from the current pen position to the pixel (xy) using the current attribute given with WinAttr command, then updates the pen position to those coordinates. The current pen position can be initialized with WinMoveTo. Note that the coordinates are relative to the topleft corner of the window. The line will be clipped at the boundaries of the window clipping area. Here is a list of the supported attributes:

A_NORMALDraw a normal line
A_REVERSEDraw an inverse line (i.e. erase the line)
A_XORDraw a line using XORing with the destination
A_THICK1Draw a double thick line
A_SHADE_VDraw the line using a vertical shading pattern
A_SHADE_HDraw the line using a horizontal shading pattern
A_SHADE_NSDraw the line using a negative slope diagonal shading pattern
A_SHADE_PSDraw the line using a positive slope diagonal shading pattern

See WinAttr command for a more general info about attributes. Note that although TI said nothing about it, attributes A_SHADE_V, A_SHADE_H, A_SHADE_NS and A_SHADE_PS work only for lines with slope more than 45 degree (i.e. for lines which are more "vertical" than "horizontal"). For "nearly horizontal" lines all of them act like A_NORMAL. I don't know whether it is a bug, or planned feature. So, if you want to draw shaded-fill rectangle using WinLine in a loop, use vertical lines for drawing, not horizontal ones!


Uses: RectWinToWin, WinMoveTo, DrawClipLine, PortRestore, ROM Call 0x413
Used by: WinLineRel, GD_Circle, GD_Line, GR3_paint3d, GR3_handleEvent, GT_ShowMarkers