| 377 | } |
| 378 | |
| 379 | void PiuPort_measureString(xsMachine* the) |
| 380 | { |
| 381 | xsSlot* string; |
| 382 | PiuStyle* style; |
| 383 | PiuDimension w, h; |
| 384 | (void)xsToString(xsArg(0)); |
| 385 | string = &xsArg(0); |
| 386 | style = PIU(Style, xsArg(1)); |
| 387 | if ((*style)->font == NULL) |
| 388 | PiuStyleLookupFont(style); |
| 389 | w = PiuFontGetWidth((*style)->font, string, 0, -1); |
| 390 | h = PiuFontGetHeight((*style)->font); |
| 391 | xsResult = xsNewObject(); |
| 392 | xsDefine(xsResult, xsID_width, xsPiuDimension(w), xsDefault); |
| 393 | xsDefine(xsResult, xsID_height, xsPiuDimension(h), xsDefault); |
| 394 | } |
nothing calls this directly
no test coverage detected