Changeset 214aefb in mainline for uspace/lib/ui/src/paint.c


Ignore:
Timestamp:
2021-04-09T22:41:22Z (3 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0262f16c
Parents:
b0858150
git-author:
Jiri Svoboda <jiri@…> (2021-03-27 22:52:09)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-04-09 22:41:22)
Message:

UI menu (WIP)

File:
1 edited

Legend:

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

    rb0858150 r214aefb  
    149149}
    150150
     151/** Paint outset frame.
     152 *
     153 * @param resource UI resource
     154 * @param rect Rectangle to paint onto
     155 * @param inside Place to store inside rectangle or @c NULL
     156 * @return EOK on success or an error code
     157 */
     158errno_t ui_paint_outset_frame(ui_resource_t *resource, gfx_rect_t *rect,
     159    gfx_rect_t *inside)
     160{
     161        gfx_rect_t frame;
     162        errno_t rc;
     163
     164        rc = ui_paint_bevel(resource->gc, rect,
     165            resource->wnd_frame_hi_color, resource->wnd_frame_sh_color,
     166            1, &frame);
     167        if (rc != EOK)
     168                goto error;
     169
     170        rc = ui_paint_bevel(resource->gc, &frame,
     171            resource->wnd_highlight_color, resource->wnd_shadow_color,
     172            1, inside);
     173        if (rc != EOK)
     174                goto error;
     175
     176        return EOK;
     177error:
     178        return rc;
     179}
     180
    151181/** Paint filled circle vertical scanline.
    152182 *
Note: See TracChangeset for help on using the changeset viewer.