Changeset e1f2079 in mainline for uspace/lib/gfx/src/coord.c


Ignore:
Timestamp:
2020-02-14T19:54:40Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b0a94854
Parents:
b252e87
Message:

Get display resolution by querying display device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfx/src/coord.c

    rb252e87 re1f2079  
    6262}
    6363
     64void gfx_coord2_clip(gfx_coord2_t *a, gfx_rect_t *clip, gfx_coord2_t *d)
     65{
     66        gfx_rect_t sclip;
     67        gfx_coord2_t t;
     68
     69        gfx_rect_points_sort(clip, &sclip);
     70
     71        t.x = min(a->x, clip->p1.x - 1);
     72        t.y = min(a->y, clip->p1.y - 1);
     73
     74        d->x = max(clip->p0.x, t.x);
     75        d->y = max(clip->p0.y, t.y);
     76}
     77
    6478/** Sort points of a span.
    6579 *
Note: See TracChangeset for help on using the changeset viewer.