Changeset 12008adf in mainline for uspace/lib/ui/src/image.c


Ignore:
Timestamp:
2020-11-12T10:58:36Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c9fdeed
Parents:
7a5825b
git-author:
Jiri Svoboda <jiri@…> (2020-11-11 23:58:55)
git-committer:
Jiri Svoboda <jiri@…> (2020-11-12 10:58:36)
Message:

Port barber to UI

File:
1 edited

Legend:

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

    r7a5825b r12008adf  
    134134        gfx_coord2_t offs;
    135135
     136        if (image->bitmap == NULL)
     137                return EOK;
     138
    136139        /*
    137140         * UI image position does not depend on bitmap rectangle p0, so
     
    149152}
    150153
     154/** Change image bitmap.
     155 *
     156 * Note that the caller must have saved the pointer to the previous bitmap
     157 * in the image, because this causes it to be unlinked from the image and
     158 * not destroyed (the ownership is transferred back to the caller).
     159 *
     160 * @param image Image
     161 * @param bitmap New bitmap (ownership transferred to image) or @c NULL
     162 * @param brect New bitmap rectangle
     163 */
     164void ui_image_set_bmp(ui_image_t *image, gfx_bitmap_t *bitmap,
     165    gfx_rect_t *brect)
     166{
     167        image->bitmap = bitmap;
     168        image->brect = *brect;
     169}
     170
    151171/** Destroy image control.
    152172 *
Note: See TracChangeset for help on using the changeset viewer.