 |
WinLineTo |
Function (ROM Call 0x19) |
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 (x, y) 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_NORMAL | Draw a normal line |
A_REVERSE | Draw an inverse line (i.e. erase the line) |
A_XOR | Draw a line using XORing with the destination |
A_THICK1 | Draw a double thick line |
A_SHADE_V | Draw the line using a vertical shading pattern |
A_SHADE_H | Draw the line using a horizontal shading pattern |
A_SHADE_NS | Draw the line using a negative slope diagonal shading pattern |
A_SHADE_PS | Draw 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