| 618 | } |
| 619 | |
| 620 | void PiuViewDrawStringSubPixel(PiuView* self, xsSlot* slot, xsIntegerValue offset, xsIntegerValue length, PiuFont* font, double x, double y, PiuDimension w, PiuDimension sw) |
| 621 | { |
| 622 | xsMachine* the = (*self)->the; |
| 623 | cairo_t* cr = (*self)->cairo; |
| 624 | xsStringValue string = PiuToString(slot); |
| 625 | if (length < 0) |
| 626 | length = c_strlen(string + offset); |
| 627 | char* text = malloc(length + 1); |
| 628 | memcpy(text, string + offset, length); |
| 629 | text[length] = 0; |
| 630 | cairo_set_font_face(cr, (*font)->face); |
| 631 | cairo_set_font_size(cr, (*font)->size); |
| 632 | cairo_move_to(cr, x, y + (*font)->ascent); |
| 633 | cairo_show_text(cr, text); |
| 634 | free(text); |
| 635 | } |
| 636 | |
| 637 | void PiuViewDrawTexture(PiuView* self, PiuTexture* texture, PiuCoordinate x, PiuCoordinate y, PiuCoordinate sx, PiuCoordinate sy, PiuDimension sw, PiuDimension sh) |
| 638 | { |
no outgoing calls
no test coverage detected