Skip to content

Drawing SysFont's have swapped X and Y g->DrawString coordinates #18

@dolumchei

Description

@dolumchei

while making a little game, ive imported the LiberationSansRegular header and drew text to the screen as a simple test.
when testing, it looked like the x and y arguments were swapped.

Image Image

the code is very simple and can be pasted into barebones/board.cpp,

void Board::Draw(Graphics *g)
{
    g->SetColor(Color(0, 0, 0));
    g->FillRect(0, 0, mWidth, mHeight);

    static SysFont aFont((AppBase*)mApp, LiberationSans_Regular, LiberationSans_Regular_Size, 18);
    g->SetFont(&aFont);
    g->SetColor(Color::White);
    g->DrawString("Weedlings", 18, 36);
}

im unsure as to why it happens, it looks fine when delving into the Graphics code, its fine as is but is a tad annoying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions