Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 81ec7e1 in mainline for uspace/lib/ui/test/paint.c


Ignore:
Timestamp:
2021-08-31T08:57:24Z (7 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
b79c91cc
Parents:
ff6e91b
git-author:
Jiri Svoboda <jiri@…> (2021-08-30 20:57:08)
git-committer:
Jiri Svoboda <jiri@…> (2021-08-31 08:57:24)
Message:

Brace for a text mode menu separator entry

Pun intended.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/test/paint.c

    rff6e91b r81ec7e1  
    277277}
    278278
     279/** Paint text horizontal brace */
     280PCUT_TEST(text_hbrace)
     281{
     282        errno_t rc;
     283        gfx_context_t *gc = NULL;
     284        ui_resource_t *resource = NULL;
     285        gfx_color_t *color = NULL;
     286        test_gc_t tgc;
     287        gfx_rect_t rect;
     288
     289        memset(&tgc, 0, sizeof(tgc));
     290        rc = gfx_context_new(&ops, &tgc, &gc);
     291        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     292
     293        rc = ui_resource_create(gc, false, &resource);
     294        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     295        PCUT_ASSERT_NOT_NULL(resource);
     296
     297        rc = gfx_color_new_rgb_i16(1, 2, 3, &color);
     298        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     299
     300        rect.p0.x = 10;
     301        rect.p0.y = 20;
     302        rect.p1.x = 30;
     303        rect.p1.y = 40;
     304
     305        /* Paint text horizontal brace */
     306        rc = ui_paint_text_hbrace(resource, &rect, ui_box_single,
     307            color);
     308
     309        gfx_color_delete(color);
     310        ui_resource_destroy(resource);
     311        rc = gfx_context_delete(gc);
     312        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     313}
     314
    279315static errno_t testgc_set_clip_rect(void *arg, gfx_rect_t *rect)
    280316{
Note: See TracChangeset for help on using the changeset viewer.