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

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


Ignore:
Timestamp:
2021-03-27T22:52:09Z (7 months ago)
Author:
Jiri Svoboda <jiri@…>
Children:
cd62879
Parents:
dbf1be5
Message:

UI menu (WIP)

File:
1 edited

Legend:

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

    rdbf1be5 rbfb055b  
    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.