Changeset ff6e91b in mainline for uspace/lib/ui/test/paint.c
- Timestamp:
- 2021-08-30T20:41:27Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 81ec7e1
- Parents:
- 9b2e20c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/test/paint.c
r9b2e20c rff6e91b 241 241 } 242 242 243 /** Paint text box */ 244 PCUT_TEST(text_box) 245 { 246 errno_t rc; 247 gfx_context_t *gc = NULL; 248 ui_resource_t *resource = NULL; 249 gfx_color_t *color = NULL; 250 test_gc_t tgc; 251 gfx_rect_t rect; 252 253 memset(&tgc, 0, sizeof(tgc)); 254 rc = gfx_context_new(&ops, &tgc, &gc); 255 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 256 257 rc = ui_resource_create(gc, false, &resource); 258 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 259 PCUT_ASSERT_NOT_NULL(resource); 260 261 rc = gfx_color_new_rgb_i16(1, 2, 3, &color); 262 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 263 264 rect.p0.x = 10; 265 rect.p0.y = 20; 266 rect.p1.x = 30; 267 rect.p1.y = 40; 268 269 /* Paint text box */ 270 rc = ui_paint_text_box(resource, &rect, ui_box_single, color); 271 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 272 273 gfx_color_delete(color); 274 ui_resource_destroy(resource); 275 rc = gfx_context_delete(gc); 276 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 277 } 278 243 279 static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect) 244 280 {
Note:
See TracChangeset
for help on using the changeset viewer.