Changeset 400a16d in mainline for uspace/app/gfxdemo/gfxdemo.c


Ignore:
Timestamp:
2021-09-03T09:27:57Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
81d3612
Parents:
f7c12b3
git-author:
Jiri Svoboda <jiri@…> (2021-09-02 17:26:05)
git-committer:
Jiri Svoboda <jiri@…> (2021-09-03 09:27:57)
Message:

Clarify right/bottom-aligned text position and fix off-by-ones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/gfxdemo/gfxdemo.c

    rf7c12b3 r400a16d  
    706706                goto error;
    707707
    708         pos.x = rect.p1.x - 1;
     708        pos.x = rect.p1.x;
    709709        pos.y = rect.p0.y;
    710710        fmt.halign = gfx_halign_right;
     
    729729                goto error;
    730730
    731         pos.x = rect.p1.x - 1;
     731        pos.x = rect.p1.x;
    732732        pos.y = (rect.p0.y + rect.p1.y - 1) / 2;
    733733        fmt.halign = gfx_halign_right;
     
    746746
    747747        pos.x = (rect.p0.x + rect.p1.x - 1) / 2;
    748         pos.y = rect.p1.y - 1;
     748        pos.y = rect.p1.y;
    749749        fmt.halign = gfx_halign_center;
    750750        rc = gfx_puttext(font, &pos, &fmt, "Bottom center");
     
    752752                goto error;
    753753
    754         pos.x = rect.p1.x - 1;
    755         pos.y = rect.p1.y - 1;
     754        pos.x = rect.p1.x;
     755        pos.y = rect.p1.y;
    756756        fmt.halign = gfx_halign_right;
    757757        rc = gfx_puttext(font, &pos, &fmt, "Bottom right");
Note: See TracChangeset for help on using the changeset viewer.