Changeset 7470d97 in mainline for uspace/lib/congfx/src/console.c
- Timestamp:
- 2021-04-30T15:05:06Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 051349b
- Parents:
- 252d03c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/congfx/src/console.c
r252d03c r7470d97 48 48 #include "../private/color.h" 49 49 50 static errno_t console_gc_set_clip_rect(void *, gfx_rect_t *); 50 51 static errno_t console_gc_set_color(void *, gfx_color_t *); 51 52 static errno_t console_gc_fill_rect(void *, gfx_rect_t *); … … 58 59 59 60 gfx_context_ops_t console_gc_ops = { 61 .set_clip_rect = console_gc_set_clip_rect, 60 62 .set_color = console_gc_set_color, 61 63 .fill_rect = console_gc_fill_rect, … … 67 69 }; 68 70 71 /** Set clipping rectangle on console GC. 72 * 73 * @param arg Console GC 74 * @param rect Rectangle 75 * 76 * @return EOK on success or an error code 77 */ 78 static errno_t console_gc_set_clip_rect(void *arg, gfx_rect_t *rect) 79 { 80 console_gc_t *cgc = (console_gc_t *) arg; 81 82 if (rect != NULL) 83 gfx_rect_clip(rect, &cgc->rect, &cgc->clip_rect); 84 else 85 cgc->clip_rect = cgc->rect; 86 87 return EOK; 88 } 89 69 90 /** Set color on console GC. 70 91 * … … 100 121 101 122 /* Make sure rectangle is clipped and sorted */ 102 gfx_rect_clip(rect, &cgc-> rect, &crect);123 gfx_rect_clip(rect, &cgc->clip_rect, &crect); 103 124 104 125 cols = cgc->rect.p1.x - cgc->rect.p0.x; … … 188 209 cgc->rect.p1.x = cols; 189 210 cgc->rect.p1.y = rows; 211 cgc->clip_rect = cgc->rect; 190 212 cgc->buf = buf; 191 213 … … 330 352 331 353 gfx_rect_translate(&offs, &srect, &drect); 332 gfx_rect_clip(&drect, &cbm->cgc-> rect, &crect);354 gfx_rect_clip(&drect, &cbm->cgc->clip_rect, &crect); 333 355 334 356 pixelmap.width = cbm->rect.p1.x - cbm->rect.p0.x;
Note:
See TracChangeset
for help on using the changeset viewer.