Changeset a8eed5f in mainline for uspace/lib/gfx
- Timestamp:
- 2020-02-28T16:03:20Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7bb45e3
- Parents:
- 0e6e77f
- git-author:
- Jiri Svoboda <jiri@…> (2020-02-27 18:02:55)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-02-28 16:03:20)
- Location:
- uspace/lib/gfx
- Files:
-
- 4 edited
-
include/gfx/bitmap.h (modified) (1 diff)
-
src/bitmap.c (modified) (1 diff)
-
test/bitmap.c (modified) (3 diffs)
-
test/coord.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gfx/include/gfx/bitmap.h
r0e6e77f ra8eed5f 42 42 #include <types/gfx/bitmap.h> 43 43 44 extern void gfx_bitmap_params_init(gfx_bitmap_params_t *); 44 45 extern errno_t gfx_bitmap_create(gfx_context_t *, gfx_bitmap_params_t *, 45 46 gfx_bitmap_alloc_t *, gfx_bitmap_t **); -
uspace/lib/gfx/src/bitmap.c
r0e6e77f ra8eed5f 35 35 36 36 #include <gfx/bitmap.h> 37 #include <mem.h> 37 38 #include <stdint.h> 38 39 #include <stdlib.h> 39 40 #include "../private/bitmap.h" 40 41 #include "../private/context.h" 42 43 /** Initialize bitmap parameters structure. 44 * 45 * Bitmap parameters structure must always be initialized using this function 46 * first. 47 * 48 * @param params Bitmap parameters structure 49 */ 50 void gfx_bitmap_params_init(gfx_bitmap_params_t *params) 51 { 52 memset(params, 0, sizeof(gfx_bitmap_params_t)); 53 } 41 54 42 55 /** Allocate bitmap in a graphics context. -
uspace/lib/gfx/test/bitmap.c
r0e6e77f ra8eed5f 84 84 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 85 85 86 gfx_bitmap_params_init(¶ms); 86 87 params.rect.p0.x = 1; 87 88 params.rect.p0.y = 2; … … 120 121 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 121 122 123 gfx_bitmap_params_init(¶ms); 124 122 125 rc = gfx_bitmap_create(gc, ¶ms, NULL, &bitmap); 123 126 PCUT_ASSERT_ERRNO_VAL(EOK, rc); … … 159 162 rc = gfx_context_new(&ops, &tgc, &gc); 160 163 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 164 165 gfx_bitmap_params_init(¶ms); 161 166 162 167 rc = gfx_bitmap_create(gc, ¶ms, NULL, &bitmap); -
uspace/lib/gfx/test/coord.c
r0e6e77f ra8eed5f 598 598 599 599 /** Rectangle dimensions for reversed rectangle are computed correctly */ 600 PCUT_TEST(rect_dims_ straight)600 PCUT_TEST(rect_dims_reversed) 601 601 { 602 602 gfx_rect_t rect;
Note:
See TracChangeset
for help on using the changeset viewer.
