MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / DrawChar

Function DrawChar

Kernel/src/video.cpp:185–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 void DrawChar(char c, unsigned int x, unsigned int y, uint8_t r, uint8_t g, uint8_t b) {
186 uint32_t colour = r << 16 | g << 8 | b;
187 for (unsigned i = 0; i < 8; i++)
188 {
189 int row = defaultFont[(int)c][i];
190 for (unsigned j = 0; j < 8; j++)
191 {
192 if ((row & (1 << j)) >> j){
193 ((uint32_t*)videoMemory)[((y + i) * screenWidth) + x + j] = colour;
194 }
195 }
196 }
197 }
198
199 void DrawBitmapImage(unsigned int x, unsigned int y, unsigned int w, unsigned int h, uint8_t *data) {
200 bitmap_file_header_t bmpHeader = *(bitmap_file_header_t*)data;

Callers 4

DrawStringFunction · 0.70
UpdateMethod · 0.70
PaintFunction · 0.50
OnPaintFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected