- Timestamp:
- 2006-06-02T08:52:59Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 838c48e
- Parents:
- 10569b1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
r10569b1 r1180a88e 166 166 } 167 167 168 /** Put pixel into viewport 169 * 170 * @param vp Viewport identification 171 * @param x X coord relative to viewport 172 * @param y Y coord relative to viewport 173 * @param color RGB color 174 */ 168 175 static void putpixel(int vp, unsigned int x, unsigned int y, int color) 169 176 { 170 177 screen.putpixel(viewports[vp].x + x, viewports[vp].y + y, color); 171 178 } 179 /** Get pixel from viewport */ 172 180 static int getpixel(int vp, unsigned int x, unsigned int y) 173 181 { … … 258 266 259 267 /** Draw character at given position */ 260 static void draw_glyph(int vp,__u8 glyph, unsigned int row, unsigned int col)268 static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy) 261 269 { 262 270 unsigned int y; 263 271 264 272 for (y = 0; y < FONT_SCANLINES; y++) 265 draw_glyph_line(vp ,fb_font[glyph * FONT_SCANLINES + y], col * COL_WIDTH, row * FONT_SCANLINES+ y);273 draw_glyph_line(vp ,fb_font[glyph * FONT_SCANLINES + y], sx, sy + y); 266 274 } 267 275 … … 308 316 int i; 309 317 310 318 for (i=0; i < MAX_VIEWPORTS; i++) { 311 319 if (!viewports[i].initialized) 312 320 break; … … 388 396 } 389 397 398 /** Draw character at given position relative to viewport 399 * 400 * @param vp Viewport identification 401 * @param c Character to print 402 * @param row Screen position relative to viewport 403 * @param col Screen position relative to viewport 404 */ 390 405 static void draw_char(int vp, char c, unsigned int row, unsigned int col) 391 406 { … … 395 410 invert_char(vp, vport->cur_row, vport->cur_col); 396 411 397 draw_glyph(vp, c, row, col);412 draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES); 398 413 399 414 vport->cur_col = col; … … 411 426 } 412 427 428 /** Function for handling connections to FB 429 * 430 */ 413 431 static void fb_client_connection(ipc_callid_t iid, ipc_call_t *icall) 414 432 { … … 546 564 } 547 565 566 /** Initialization of framebuffer */ 548 567 int fb_init(void) 549 568 {
Note:
See TracChangeset
for help on using the changeset viewer.