MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuViewDrawString

Function PiuViewDrawString

modules/piu/MC/piuView.c:401–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void PiuViewDrawString(PiuView* self, xsSlot* string, xsIntegerValue offset, xsIntegerValue length, PiuFont* font, PiuCoordinate x, PiuCoordinate y, PiuDimension w, PiuDimension sw)
402{
403 Poco poco = (*self)->poco;
404 x += poco->xOrigin;
405 y += poco->yOrigin;
406#ifdef piuGPU
407 PiuViewDrawStringAux(self, string, offset, length, font, (*self)->pixel, (*self)->blend, x, y, w, sw);
408#else
409 {
410 PIUQueueCommand(DrawStringCommand);
411 command->string = string;
412 command->offset = offset;
413 command->length = length;
414 command->font = font;
415 command->color = (*self)->pixel;
416 command->blend = (*self)->blend;
417 command->x = x;
418 command->y = y;
419 command->w = w;
420 command->sw = sw;
421 }
422#endif
423}
424
425void PiuViewDrawStringAux(PiuView* self, xsSlot* string, xsIntegerValue offset, xsIntegerValue length, PiuFont* font, PocoColor color, uint8_t blend, PiuCoordinate x, PiuCoordinate y, PiuDimension width, PiuDimension stringWidth)
426{

Callers 3

PiuTextDrawFunction · 0.50
PiuPort_drawStringFunction · 0.50
PiuStyleDrawFunction · 0.50

Calls 1

PiuViewDrawStringAuxFunction · 0.85

Tested by

no test coverage detected