- Timestamp:
- 2006-06-04T11:28:47Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67ec84b
- Parents:
- a78e273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
ra78e273 rd530237a 267 267 /* Character-console functions */ 268 268 269 /** Draw character at given position */ 270 static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy, style_t style) 269 /** Draw character at given position 270 * 271 * @param vp Viewport where the character is printed 272 * @param sx Coordinates of top-left of the character 273 * @param sy Coordinates of top-left of the character 274 * @param style Color of the character 275 * @param transparent If false, print background color 276 */ 277 static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy, 278 style_t style, int transparent) 271 279 { 272 280 int i; … … 279 287 if (glline & (1 << (7 - i))) 280 288 putpixel(vp, sx + i, sy + y, style.fg_color); 281 else 289 else if (!transparent) 282 290 putpixel(vp, sx + i, sy + y, style.bg_color); 283 291 } … … 427 435 * @param row Screen position relative to viewport 428 436 * @param col Screen position relative to viewport 429 */ 430 static void draw_char(int vp, char c, unsigned int row, unsigned int col, style_t style) 437 * @param transparent If false, print background color with character 438 */ 439 static void draw_char(int vp, char c, unsigned int row, unsigned int col, style_t style, int transparent) 431 440 { 432 441 viewport_t *vport = &viewports[vp]; … … 437 446 invert_char(vp, vport->cur_row, vport->cur_col); 438 447 439 draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES, style );448 draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES, style, transparent); 440 449 441 450 vport->cur_col = col; … … 470 479 col = i % vport->cols; 471 480 row = i / vport->cols; 472 draw_glyph(vp, data[i].character, col * COL_WIDTH, row * FONT_SCANLINES, data[i].style); 481 draw_glyph(vp, data[i].character, col * COL_WIDTH, row * FONT_SCANLINES, 482 data[i].style, style_same(data[i].style,vport->style)); 473 483 } 474 484 cursor_print(vp); … … 779 789 780 790 case FB_PUTCHAR: 791 case FB_TRANS_PUTCHAR: 781 792 c = IPC_GET_ARG1(call); 782 793 row = IPC_GET_ARG2(call); … … 788 799 ipc_answer_fast(callid,0,0,0); 789 800 790 draw_char(vp, c, row, col, vport->style );801 draw_char(vp, c, row, col, vport->style, IPC_GET_METHOD(call) == FB_TRANS_PUTCHAR); 791 802 continue; /* msg already answered */ 792 803 case FB_CLEAR:
Note:
See TracChangeset
for help on using the changeset viewer.