Changeset 00ddb40 in mainline for uspace/lib/draw


Ignore:
Timestamp:
2014-08-31T20:10:20Z (11 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5713e5f
Parents:
8d3512f1
Message:

Get rid of black alias at the edge of rotated windows

Location:
uspace/lib/draw
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/font/bitmap_backend.c

    r8d3512f1 r00ddb40  
    143143        source_t source;
    144144        source_init(&source);
    145         source_set_texture(&source, raw_surface, false);
     145        source_set_texture(&source, raw_surface, PIXELMAP_EXTEND_TRANSPARENT_BLACK);
    146146
    147147        transform_t transform;
  • uspace/lib/draw/source.c

    r8d3512f1 r00ddb40  
    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;
  • uspace/lib/draw/source.h

    r8d3512f1 r00ddb40  
    4242#include <transform.h>
    4343#include <filter.h>
     44#include <io/pixelmap.h>
    4445
    4546#include "surface.h"
     
    5152        pixel_t color;
    5253        surface_t *texture;
    53         bool texture_tile;
     54        pixelmap_extend_t texture_extend;
    5455
    5556        pixel_t alpha;
    5657        surface_t *mask;
    57         bool mask_tile;
     58        pixelmap_extend_t mask_extend;
    5859} source_t;
    5960
     
    6667
    6768extern void source_set_color(source_t *, pixel_t);
    68 extern void source_set_texture(source_t *, surface_t *, bool);
     69extern void source_set_texture(source_t *, surface_t *, pixelmap_extend_t);
    6970
    7071extern void source_set_alpha(source_t *, pixel_t);
    71 extern void source_set_mask(source_t *, surface_t *, bool);
     72extern void source_set_mask(source_t *, surface_t *, pixelmap_extend_t);
    7273
    7374extern bool source_is_fast(source_t *);
Note: See TracChangeset for help on using the changeset viewer.