Changeset beb5683 in mainline
- Timestamp:
- 2012-08-18T18:32:27Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b5416c3
- Parents:
- 74fec95
- Location:
- uspace/lib/draw
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/surface.c
r74fec95 rbeb5683 44 44 surface_flags_t flags; 45 45 46 s ysarg_t dirty_x_lo;47 s ysarg_t dirty_x_hi;48 s ysarg_t dirty_y_lo;49 s ysarg_t dirty_y_hi;46 surface_coord_t dirty_x_lo; 47 surface_coord_t dirty_x_hi; 48 surface_coord_t dirty_y_lo; 49 surface_coord_t dirty_y_hi; 50 50 51 51 pixelmap_t pixmap; 52 52 }; 53 53 54 surface_t *surface_create( 55 sysarg_t width, sysarg_t height,pixel_t *pixbuf, surface_flags_t flags)54 surface_t *surface_create(surface_coord_t width, surface_coord_t height, 55 pixel_t *pixbuf, surface_flags_t flags) 56 56 { 57 57 surface_t *surface = (surface_t *) malloc(sizeof(surface_t)); … … 118 118 } 119 119 120 void surface_get_resolution(surface_t *surface, s ysarg_t *width, sysarg_t *height)120 void surface_get_resolution(surface_t *surface, surface_coord_t *width, surface_coord_t *height) 121 121 { 122 122 assert(width); … … 127 127 } 128 128 129 void surface_get_damaged_region(surface_t *surface, s ysarg_t *x, sysarg_t *y,130 s ysarg_t *width, sysarg_t *height)129 void surface_get_damaged_region(surface_t *surface, surface_coord_t *x, surface_coord_t *y, 130 surface_coord_t *width, surface_coord_t *height) 131 131 { 132 132 assert(x); … … 151 151 } 152 152 153 void surface_put_pixel(surface_t *surface, s ysarg_t x, sysarg_t y, pixel_t pixel)153 void surface_put_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y, pixel_t pixel) 154 154 { 155 155 surface->dirty_x_lo = surface->dirty_x_lo > x ? x : surface->dirty_x_lo; … … 163 163 } 164 164 165 pixel_t surface_get_pixel(surface_t *surface, s ysarg_t x, sysarg_t y)165 pixel_t surface_get_pixel(surface_t *surface, surface_coord_t x, surface_coord_t y) 166 166 { 167 167 if (x < surface->pixmap.width && y < surface->pixmap.height) { -
uspace/lib/draw/surface.h
r74fec95 rbeb5683 45 45 typedef struct surface surface_t; 46 46 47 typedef sysarg_t surface_coord_t; 48 47 49 typedef enum { 48 50 SURFACE_FLAG_NONE = 0, … … 50 52 } surface_flags_t; 51 53 52 extern surface_t *surface_create(s ysarg_t, sysarg_t, pixel_t *, surface_flags_t);54 extern surface_t *surface_create(surface_coord_t, surface_coord_t, pixel_t *, surface_flags_t); 53 55 extern void surface_destroy(surface_t *); 54 56 … … 56 58 extern pixel_t *surface_direct_access(surface_t *); 57 59 extern pixelmap_t *surface_pixmap_access(surface_t *); 58 extern void surface_get_resolution(surface_t *, s ysarg_t *, sysarg_t *);59 extern void surface_get_damaged_region(surface_t *, s ysarg_t *, sysarg_t *,60 s ysarg_t *, sysarg_t *);60 extern void surface_get_resolution(surface_t *, surface_coord_t *, surface_coord_t *); 61 extern void surface_get_damaged_region(surface_t *, surface_coord_t *, surface_coord_t *, 62 surface_coord_t *, surface_coord_t *); 61 63 extern void surface_reset_damaged_region(surface_t *); 62 64 63 extern void surface_put_pixel(surface_t *, s ysarg_t, sysarg_t, pixel_t);64 extern pixel_t surface_get_pixel(surface_t *, s ysarg_t, sysarg_t);65 extern void surface_put_pixel(surface_t *, surface_coord_t, surface_coord_t, pixel_t); 66 extern pixel_t surface_get_pixel(surface_t *, surface_coord_t, surface_coord_t); 65 67 66 68 #endif
Note:
See TracChangeset
for help on using the changeset viewer.