MCPcopy Create free account
hub / github.com/dborth/fceugx / drawTextFeature

Method drawTextFeature

source/utils/FreeTypeGX.cpp:471–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471void FreeTypeGX::drawTextFeature(int16_t x, int16_t y, uint16_t width, ftgxDataOffset *offsetData, uint16_t format, GXColor color)
472{
473 uint16_t featureHeight = this->ftPointSize >> 4 > 0 ? this->ftPointSize >> 4 : 1;
474
475 if (format & FTGX_STYLE_UNDERLINE)
476 this->copyFeatureToFramebuffer(width, featureHeight, x, y + 1, color);
477
478 if (format & FTGX_STYLE_STRIKE)
479 this->copyFeatureToFramebuffer(width, featureHeight, x, y - ((offsetData->max) >> 1), color);
480}
481
482/**
483 * Processes the supplied string and return the width of the string in pixels.

Callers 1

drawTextMethod · 0.95

Calls 1

Tested by

no test coverage detected