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

Add icon blit helper function #1458

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Oct 11, 2023

Adds a helper method for using the blit function with icons.

Icons in arcade are 1 bit per pixel, so they don't contain any color information. Our other icon methods take a color argument to use for the non-transparent pixels; this simply adds a copy of blit that passes such an argument.

I need this for my fancy-text extension (or, rather, for my mini-menu extension which I am converting to use the fancy-text extension).

Copy link
Contributor

@eanders-ms eanders-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Conditionals in the inner loop aren't ideal, but something we can optimize later if the need arises.

Copy link
Member

@jwunderl jwunderl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as eric said bit of a hotpath so maybe worth quick hardware tests to double check but can defer that till later too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants