Changeset 00ddb40 in mainline for uspace/lib/draw
- Timestamp:
- 2014-08-31T20:10:20Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5713e5f
- Parents:
- 8d3512f1
- Location:
- uspace/lib/draw
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/draw/font/bitmap_backend.c
r8d3512f1 r00ddb40 143 143 source_t source; 144 144 source_init(&source); 145 source_set_texture(&source, raw_surface, false);145 source_set_texture(&source, raw_surface, PIXELMAP_EXTEND_TRANSPARENT_BLACK); 146 146 147 147 transform_t transform; -
uspace/lib/draw/source.c
r8d3512f1 r00ddb40 45 45 source->color = PIXEL(0, 0, 0, 0); 46 46 source->texture = NULL; 47 source->texture_ tile = false;47 source->texture_extend = PIXELMAP_EXTEND_TRANSPARENT_BLACK; 48 48 49 49 source->alpha = PIXEL(255, 0, 0, 0); 50 50 source->mask = NULL; 51 source->mask_ tile = false;51 source->mask_extend = PIXELMAP_EXTEND_TRANSPARENT_BLACK; 52 52 } 53 53 … … 73 73 } 74 74 75 void source_set_texture(source_t *source, surface_t *texture, bool tile) 75 void source_set_texture(source_t *source, surface_t *texture, 76 pixelmap_extend_t extend) 76 77 { 77 78 source->texture = texture; 78 source->texture_ tile = tile;79 source->texture_extend = extend; 79 80 } 80 81 … … 84 85 } 85 86 86 void source_set_mask(source_t *source, surface_t *mask, bool tile) 87 void source_set_mask(source_t *source, surface_t *mask, 88 pixelmap_extend_t extend) 87 89 { 88 90 source->mask = mask; 89 source->mask_ tile = tile;91 source->mask_extend = extend; 90 92 } 91 93 … … 95 97 (source->alpha == (pixel_t) PIXEL(255, 0, 0, 0)) && 96 98 (source->texture != NULL) && 97 (source->texture_ tile == false) &&99 (source->texture_extend == PIXELMAP_EXTEND_TRANSPARENT_BLACK) && 98 100 (transform_is_fast(&source->transform))); 99 101 } … … 120 122 mask_pix = source->filter( 121 123 surface_pixmap_access(source->mask), 122 x, y, source->mask_ tile);124 x, y, source->mask_extend); 123 125 } else { 124 126 mask_pix = source->alpha; … … 133 135 texture_pix = source->filter( 134 136 surface_pixmap_access(source->texture), 135 x, y, source->texture_ tile);137 x, y, source->texture_extend); 136 138 } else { 137 139 texture_pix = source->color; -
uspace/lib/draw/source.h
r8d3512f1 r00ddb40 42 42 #include <transform.h> 43 43 #include <filter.h> 44 #include <io/pixelmap.h> 44 45 45 46 #include "surface.h" … … 51 52 pixel_t color; 52 53 surface_t *texture; 53 bool texture_tile;54 pixelmap_extend_t texture_extend; 54 55 55 56 pixel_t alpha; 56 57 surface_t *mask; 57 bool mask_tile;58 pixelmap_extend_t mask_extend; 58 59 } source_t; 59 60 … … 66 67 67 68 extern void source_set_color(source_t *, pixel_t); 68 extern void source_set_texture(source_t *, surface_t *, bool);69 extern void source_set_texture(source_t *, surface_t *, pixelmap_extend_t); 69 70 70 71 extern void source_set_alpha(source_t *, pixel_t); 71 extern void source_set_mask(source_t *, surface_t *, bool);72 extern void source_set_mask(source_t *, surface_t *, pixelmap_extend_t); 72 73 73 74 extern bool source_is_fast(source_t *);
Note:
See TracChangeset
for help on using the changeset viewer.