Changeset ba733e83 in mainline
- Timestamp:
- 2012-11-23T10:08:02Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 563573b
- Parents:
- 7dba813
- Location:
- uspace/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/pixelmap.h
r7dba813 rba733e83 52 52 sysarg_t y) 53 53 { 54 size_t offset = y * pixelmap->width + x; 55 pixel_t *pixel = pixelmap->data + offset; 56 return pixel; 54 if (x < pixelmap->width && y < pixelmap->height) { 55 size_t offset = y * pixelmap->width + x; 56 pixel_t *pixel = pixelmap->data + offset; 57 return pixel; 58 } else { 59 return NULL; 60 } 57 61 } 58 62 -
uspace/lib/draw/surface.c
r7dba813 rba733e83 171 171 surface->dirty_y_hi = surface->dirty_y_hi < y ? y : surface->dirty_y_hi; 172 172 173 if (x < surface->pixmap.width && y < surface->pixmap.height) { 174 pixelmap_put_pixel(&surface->pixmap, x, y, pixel); 175 } 173 pixelmap_put_pixel(&surface->pixmap, x, y, pixel); 176 174 } 177 175 178 176 pixel_t surface_get_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y) 179 177 { 180 if (x < surface->pixmap.width && y < surface->pixmap.height) { 181 return pixelmap_get_pixel(&surface->pixmap, x, y); 182 } else { 183 return 0; 184 } 178 return pixelmap_get_pixel(&surface->pixmap, x, y); 185 179 } 186 180 -
uspace/lib/gui/terminal.c
r7dba813 rba733e83 199 199 pixel_t *dst = pixelmap_pixel_at( 200 200 surface_pixmap_access(surface), bx, by + y); 201 pixel_t *dst_max = pixelmap_pixel_at( 202 surface_pixmap_access(surface), bx + FONT_WIDTH - 1, by + y); 203 if (!dst || !dst_max) continue; 201 204 int count = FONT_WIDTH; 202 205 while (count-- != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.