Ignore:
Timestamp:
2020-05-24T17:59:02Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3b00b6
Parents:
ef20a91
Message:

Implement bitmap color key to allow transparent cursor background

This seems to be the simplest solution of them all. It will work
on any bit depth except 1 bit per pixel (monochrome), where we would
need to extend the bitmap with a bit mask instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfx/include/types/gfx/bitmap.h

    ref20a91 rbea947f  
    3838
    3939#include <errno.h>
     40#include <io/pixel.h>
    4041#include <stddef.h>
    4142#include <types/gfx/coord.h>
     
    4445typedef struct gfx_bitmap gfx_bitmap_t;
    4546
     47/** Bitmap flags */
     48typedef enum {
     49        /** Enable color key */
     50        bmpf_color_key = 0x1
     51} gfx_bitmap_flags_t;
     52
    4653/** Bitmap parameters */
    4754typedef struct {
    4855        /** Rectangle represented in pixel array */
    4956        gfx_rect_t rect;
     57        /** Bitmap flags */
     58        gfx_bitmap_flags_t flags;
     59        /** Key color */
     60        pixel_t key_color;
    5061} gfx_bitmap_params_t;
    5162
Note: See TracChangeset for help on using the changeset viewer.