MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / DrawBitmappedText

Function DrawBitmappedText

src/Drawer2D.c:552–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552static void DrawBitmappedText(struct Bitmap* bmp, struct DrawTextArgs* args, int x, int y) {
553 int offset = Drawer2D_ShadowOffset(args->font->size);
554
555 if (!fontBitmap.scan0) {
556 if (args->useShadow) FallbackFont_DrawText(args, bmp, x, y, true);
557 FallbackFont_DrawText(args, bmp, x, y, false);
558 return;
559 }
560
561 if (args->useShadow) {
562 DrawBitmappedTextCore(bmp, args, x + offset, y + offset, true);
563 }
564 DrawBitmappedTextCore(bmp, args, x, y, false);
565}
566
567static int MeasureBitmappedWidth(const struct DrawTextArgs* args) {
568 int i, point = args->font->size;

Callers 1

Context2D_DrawTextFunction · 0.85

Calls 2

FallbackFont_DrawTextFunction · 0.85
DrawBitmappedTextCoreFunction · 0.85

Tested by

no test coverage detected