MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / FTMatrixFromAngle

Function FTMatrixFromAngle

Source/Graphics/text.cpp:254–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static void FTMatrixFromAngle(FT_Matrix* matrix, float degrees) {
255 float angle = degrees / 180.0f * 3.1415927f;
256 matrix->xx = (FT_Fixed)(cos(angle) * 0x10000L);
257 matrix->xy = (FT_Fixed)(-sin(angle) * 0x10000L);
258 matrix->yx = (FT_Fixed)(sin(angle) * 0x10000L);
259 matrix->yy = (FT_Fixed)(cos(angle) * 0x10000L);
260}
261
262static void ClearTextMetrics(TextMetrics* metrics) {
263 metrics->advance[0] = 0;

Callers 3

RenderTextMethod · 0.85
GetLetterPosXYMethod · 0.85
GetCursorPosMethod · 0.85

Calls 2

cosFunction · 0.50
sinFunction · 0.50

Tested by

no test coverage detected