MCPcopy Create free account
hub / github.com/dborth/vbagx / copyFeatureToFramebuffer

Method copyFeatureToFramebuffer

source/utils/FreeTypeGX.cpp:659–679  ·  view source on GitHub ↗

* Creates a feature quad to the EFB. * * This function creates a simple quad for displaying underline or strikeout text styling. * * @param featureWidth The pixel width of the quad. * @param featureHeight The pixel height of the quad. * @param screenX The screen X coordinate at which to output the quad. * @param screenY The screen Y coordinate at which to output the quad. * @param color Co

Source from the content-addressed store, hash-verified

657 * @param color Color to apply to the texture.
658 */
659void FreeTypeGX::copyFeatureToFramebuffer(f32 featureWidth, f32 featureHeight, int16_t screenX, int16_t screenY, GXColor color)
660{
661 GX_SetTevOp (GX_TEVSTAGE0, GX_PASSCLR);
662 GX_SetVtxDesc (GX_VA_TEX0, GX_NONE);
663
664 GX_Begin(GX_QUADS, this->vertexIndex, 4);
665 GX_Position2s16(screenX, screenY);
666 GX_Color4u8(color.r, color.g, color.b, color.a);
667
668 GX_Position2s16(featureWidth + screenX, screenY);
669 GX_Color4u8(color.r, color.g, color.b, color.a);
670
671 GX_Position2s16(featureWidth + screenX, featureHeight + screenY);
672 GX_Color4u8(color.r, color.g, color.b, color.a);
673
674 GX_Position2s16(screenX, featureHeight + screenY);
675 GX_Color4u8(color.r, color.g, color.b, color.a);
676 GX_End();
677
678 this->setDefaultMode();
679}

Callers 1

drawTextFeatureMethod · 0.95

Calls 1

setDefaultModeMethod · 0.95

Tested by

no test coverage detected