Changeset 8a9a41e in mainline for uspace/lib/gfx/src/color.c
- Timestamp:
- 2021-10-24T08:28:43Z (4 years ago)
- Children:
- 9ea3a41
- Parents:
- 2ce943a (diff), cd981f2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Erik Kučák <35500848+Riko196@…> (2021-10-24 08:28:43)
- git-committer:
- GitHub <noreply@…> (2021-10-24 08:28:43)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/src/color.c
r2ce943a r8a9a41e 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 69 69 } 70 70 71 /** Create new EGA color. 72 * 73 * @param attr EGA attributes 74 * @param rcolor Place to store pointer to new color 75 * 76 * @return EOK on success or an error code, ENOMEM if out of resources, 77 * EIO if the graphic device connection was lost 78 */ 79 errno_t gfx_color_new_ega(uint8_t attr, gfx_color_t **rcolor) 80 { 81 gfx_color_t *color; 82 83 color = calloc(1, sizeof(gfx_color_t)); 84 if (color == NULL) 85 return ENOMEM; 86 87 color->attr = attr; 88 89 *rcolor = color; 90 return EOK; 91 } 92 71 93 /** Delete color. 72 94 * … … 93 115 } 94 116 117 /** Convert color to EGA attributes. 118 * 119 * @param color Color 120 * @param attr Place to store EGA attributes 121 */ 122 void gfx_color_get_ega(gfx_color_t *color, uint8_t *attr) 123 { 124 *attr = color->attr; 125 } 126 95 127 /** @} 96 128 */
Note:
See TracChangeset
for help on using the changeset viewer.