mardi 20 février 2018

How to draw string with D2D1.h?

I can draw a box fine but I'm not sure how to draw strings?

void Graphics::DrawBox(float x, float y, float width, float height, float thicc, float r, float g, float b, float a, bool filled)
{

    brush->SetColor(D2D1::ColorF(r, g, b, a));
    if (filled)
    {
        renderTarget->FillRectangle(D2D1::RectF(x, y, width, height), brush);
    }
    else
    {
        renderTarget->DrawRectangle(D2D1::RectF(x, y, width, height), brush, thicc);
    }
}

Aucun commentaire:

Enregistrer un commentaire