Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipped text respects multiple transparent colors #353

Closed
jacobly0 opened this issue Jan 23, 2022 · 1 comment
Closed

Clipped text respects multiple transparent colors #353

jacobly0 opened this issue Jan 23, 2022 · 1 comment
Assignees

Comments

@jacobly0
Copy link
Member

jacobly0 commented Jan 23, 2022

Calling gfx_SetTextConfig(gfx_text_clip); causes print routines to draw both gfx_SetTransparentColor and gfx_SetTextTransparentColor colors as transparent. For example:

#include <tice.h>
#include <graphx.h>

int main(void)
{
    bool clip = false;

    /* Initialize graphics drawing */
    gfx_Begin();

    gfx_FillScreen(0x07);
    gfx_SetTransparentColor(0x18);
    gfx_SetTextTransparentColor(0xE0);
    gfx_SetTextBGColor(0x18);
    gfx_SetTextFGColor(0xE0);

    for (const char *c = "Hello, world!"; *c != '\0'; ++c, clip = !clip)
    {
        gfx_SetTextConfig(clip ? gfx_text_clip : gfx_text_noclip);
        gfx_PrintChar(*c);
    }

    /* Waits for a key */
    while (!os_GetCSC());

    /* End graphics drawing */
    gfx_End();

    return 0;
}
@jacobly0 jacobly0 changed the title Clipped text doesn't support background colors Clipped text doesn't use the correct transparent color Jan 23, 2022
@jacobly0 jacobly0 changed the title Clipped text doesn't use the correct transparent color Clipped text doesn't use the correct colors Jan 23, 2022
@jacobly0 jacobly0 changed the title Clipped text doesn't use the correct colors Clipped text doesn't use the correct transparent color Jan 23, 2022
@jacobly0 jacobly0 changed the title Clipped text doesn't use the correct transparent color Clipped text respects multiple transparent colors Jan 23, 2022
@mateoconlechuga
Copy link
Member

Clipped text is just implemented horribly so :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants