MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / drawGlyph

Function drawGlyph

deps/SDL2/Xcode-iOS/Demos/src/keyboard.c:152–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void
153drawGlyph(int glyph, int positionIndex)
154{
155 int x, y;
156 getPositionForCharNumber(positionIndex, &x, &y);
157 SDL_Rect srcRect = { GLYPH_SIZE_IMAGE * glyph, 0, GLYPH_SIZE_IMAGE, GLYPH_SIZE_IMAGE };
158 SDL_Rect dstRect = { x, y, GLYPH_SIZE_SCREEN, GLYPH_SIZE_SCREEN };
159 SDL_RenderCopy(renderer, texture, &srcRect, &dstRect);
160}
161
162/* this function loads our font into an SDL_Texture and returns the SDL_Texture */
163SDL_Texture*

Callers 1

drawFunction · 0.85

Calls 2

getPositionForCharNumberFunction · 0.85
SDL_RenderCopyFunction · 0.85

Tested by

no test coverage detected