| WinAttr | Function (ROM Call 0x2)

wingraph.h

short WinAttr (WINDOW *w, short Attr);

Sets the default window attribute.

WinAttr sets the attribute for the next write (or draw) to the window pointed to by w to Attr. This attribute will be used in all drawing commands which have not an attribute as explicite parameter. The interpretation of the attribute depends of concrete graphic command. Some attributes are only valid for certain graphic operation. Legal attribute values are defined in enum Attrs. In a general, the following attributes are supported:

A_REVERSE | Destination pixels turned off
A_NORMAL | Destination pixels turned on
A_XOR | Source pixels XORed with destination pixels
A_SHADED | Destination pixels masked so that every other pixel turned off
A_REPLACE | Source pixels replace destination pixels
A_OR | Source pixels ORed with destination pixels

For lines the following additional attributes are supported:

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

WinAttr returns the previous current attribute.
Note: 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 a line drawing command (for example, WinLine) in a loop, use vertical lines for drawing, not horizontal ones! Note also that these additional attributes work fine with WinFillTriangle and WinFillLines2, but not with WinFill!

Used by: cmd_circle, cmd_disp, cmd_line, cmd_linehorz, cmd_linevert, cmd_output, cmd_pause, cmd_ptchg, cmd_ptoff, cmd_pton, cmd_pttext, cmd_pxlchg, cmd_pxlcircle, cmd_pxlhorz, cmd_pxlline, cmd_pxloff, cmd_pxlon, cmd_pxltext, cmd_pxlvert, cmd_shade, Dialog, ERD_dialog, ABT_dialog, EV_defaultHandler, handleVarLinkKey, GD_Pen, GD_Text, GR3_paint3d, HomeExecute, ST_eraseHelp, ST_modKey, TE_open, TE_openFixed, ERD_notice, EV_quit, FuncLineFlt, GM_Integrate, GM_Shade, gr_DispLabels, GR3_addContours, GR3_handleEvent, GrLineFlt, GT_BackupToScr, GT_DspMsg, GT_DspTraceCoords, GT_KeyIn, GT_ShowMarkers, GT_Trace, Regraph, YCvtFtoP, ROM Call 0x45B