| 183 | } |
| 184 | |
| 185 | static void Fallback_DrawCell(struct Bitmap* bmp, int x, int y, |
| 186 | int scale, const cc_uint8* rows, BitmapCol color) { |
| 187 | int xx, srcX, dstX; |
| 188 | int yy, srcY, dstY; |
| 189 | BitmapCol* dst_row; |
| 190 | cc_uint8 src_row; |
| 191 | |
| 192 | for (srcY = 0, dstY = y; srcY < CELL_SIZE; srcY++) |
| 193 | { |
| 194 | for (yy = 0; yy < scale; yy++, dstY++) |
| 195 | { |
| 196 | if (dstY < 0 || dstY >= bmp->height) continue; |
| 197 | |
| 198 | dst_row = Bitmap_GetRow(bmp, dstY); |
| 199 | src_row = rows[srcY]; |
| 200 | |
| 201 | for (srcX = 0, dstX = x; srcX < CELL_SIZE; srcX++) |
| 202 | { |
| 203 | for (xx = 0; xx < scale; xx++, dstX++) |
| 204 | { |
| 205 | if (dstX < 0 || dstX >= bmp->width) continue; |
| 206 | |
| 207 | if (src_row & (1 << srcX)) { |
| 208 | dst_row[dstX] = color; |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void FallbackFont_DrawText(struct DrawTextArgs* args, struct Bitmap* bmp, int x, int y, cc_bool shadow) { |
| 217 | cc_string left = args->text, part; |
no outgoing calls
no test coverage detected