Changes in uspace/lib/gfx/src/color.c [211fd68:a3f63ac] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/color.c
r211fd68 ra3f63ac 1 1 /* 2 * Copyright (c) 20 24Jiri Svoboda2 * Copyright (c) 2019 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 64 64 color->g = g; 65 65 color->b = b; 66 color->attr = 0xff;67 68 *rcolor = color;69 return EOK;70 }71 72 /** Create new EGA color.73 *74 * @param attr EGA attributes75 * @param rcolor Place to store pointer to new color76 *77 * @return EOK on success or an error code, ENOMEM if out of resources,78 * EIO if the graphic device connection was lost79 */80 errno_t gfx_color_new_ega(uint8_t attr, gfx_color_t **rcolor)81 {82 gfx_color_t *color;83 84 color = calloc(1, sizeof(gfx_color_t));85 if (color == NULL)86 return ENOMEM;87 88 color->attr = attr;89 66 90 67 *rcolor = color; … … 116 93 } 117 94 118 /** Convert color to EGA attributes.119 *120 * @param color Color121 * @param attr Place to store EGA attributes122 */123 void gfx_color_get_ega(gfx_color_t *color, uint8_t *attr)124 {125 *attr = color->attr;126 }127 128 95 /** @} 129 96 */
Note:
See TracChangeset
for help on using the changeset viewer.