Changeset 5713e5f in mainline for uspace/lib/draw/source.c


Ignore:
Timestamp:
2014-09-01T19:17:55Z (10 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
21365c0
Parents:
a4666a9 (diff), 00ddb40 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge improvements in the graphics stack.

  • Support for drawing proportional fonts (although no actual font file included yet)
  • Implementation of bilinear filter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/source.c

    ra4666a9 r5713e5f  
    4545        source->color = PIXEL(0, 0, 0, 0);
    4646        source->texture = NULL;
    47         source->texture_tile = false;
     47        source->texture_extend = PIXELMAP_EXTEND_TRANSPARENT_BLACK;
    4848
    4949        source->alpha = PIXEL(255, 0, 0, 0);
    5050        source->mask = NULL;
    51         source->mask_tile = false;
     51        source->mask_extend = PIXELMAP_EXTEND_TRANSPARENT_BLACK;
    5252}
    5353
     
    7373}
    7474
    75 void source_set_texture(source_t *source, surface_t *texture, bool tile)
     75void source_set_texture(source_t *source, surface_t *texture,
     76    pixelmap_extend_t extend)
    7677{
    7778        source->texture = texture;
    78         source->texture_tile = tile;
     79        source->texture_extend = extend;
    7980}
    8081
     
    8485}
    8586
    86 void source_set_mask(source_t *source, surface_t *mask, bool tile)
     87void source_set_mask(source_t *source, surface_t *mask,
     88    pixelmap_extend_t extend)
    8789{
    8890        source->mask = mask;
    89         source->mask_tile = tile;
     91        source->mask_extend = extend;
    9092}
    9193
     
    9597            (source->alpha == (pixel_t) PIXEL(255, 0, 0, 0)) &&
    9698            (source->texture != NULL) &&
    97             (source->texture_tile == false) &&
     99            (source->texture_extend == PIXELMAP_EXTEND_TRANSPARENT_BLACK) &&
    98100            (transform_is_fast(&source->transform)));
    99101}
     
    120122                mask_pix = source->filter(
    121123                    surface_pixmap_access(source->mask),
    122                     x, y, source->mask_tile);
     124                    x, y, source->mask_extend);
    123125        } else {
    124126                mask_pix = source->alpha;
     
    133135                texture_pix = source->filter(
    134136                    surface_pixmap_access(source->texture),
    135                     x, y, source->texture_tile);
     137                    x, y, source->texture_extend);
    136138        } else {
    137139                texture_pix = source->color;
Note: See TracChangeset for help on using the changeset viewer.