| 223 | } |
| 224 | |
| 225 | void PiuPort_drawString(xsMachine* the) |
| 226 | { |
| 227 | xsIntegerValue c = xsToInteger(xsArgc); |
| 228 | PiuPort* self = PIU(Port, xsThis); |
| 229 | PiuView* view = (*self)->view; |
| 230 | xsSlot* string; |
| 231 | PiuStyle* style; |
| 232 | PiuColorRecord color; |
| 233 | PiuCoordinate x, y; |
| 234 | PiuDimension w, sw; |
| 235 | if (!view) xsUnknownError("out of sequence"); |
| 236 | style = PIU(Style, xsArg(1)); |
| 237 | if ((*style)->font == NULL) |
| 238 | PiuStyleLookupFont(style); |
| 239 | PiuColorDictionary(the, &xsArg(2), &color); |
| 240 | string = PiuString(xsArg(0)); |
| 241 | x = xsToPiuCoordinate(xsArg(3)); |
| 242 | y = xsToPiuCoordinate(xsArg(4)); |
| 243 | w = (c > 5) ? xsToPiuDimension(xsArg(5)) : 0; |
| 244 | sw = w ? PiuFontGetWidth((*style)->font, string, 0, -1) : 0; |
| 245 | PiuViewPushColor(view, &color); |
| 246 | PiuViewDrawString(view, string, 0, -1, (*style)->font, x, y, w, sw); |
| 247 | PiuViewPopColor(view); |
| 248 | } |
| 249 | |
| 250 | void PiuPort_drawStyle(xsMachine* the) |
| 251 | { |
nothing calls this directly
no test coverage detected