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

Support blitter with 8 horizontal levels (similar to NCBLIT_8x1) #2836

Closed
eschnett opened this issue Jan 10, 2025 · 3 comments
Closed

Support blitter with 8 horizontal levels (similar to NCBLIT_8x1) #2836

eschnett opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request nonfix closed without a successful fix (invalid, wontfix)
Milestone

Comments

@eschnett
Copy link
Contributor

julia> [Char(ch) for ch in 0x2588:0x258f]
8-element Vector{Char}:
'█': Unicode U+2588 (category So: Symbol, other)
'▉': Unicode U+2589 (category So: Symbol, other)
'▊': Unicode U+258A (category So: Symbol, other)
'▋': Unicode U+258B (category So: Symbol, other)
'▌': Unicode U+258C (category So: Symbol, other)
'▍': Unicode U+258D (category So: Symbol, other)
'▎': Unicode U+258E (category So: Symbol, other)
'▏': Unicode U+258F (category So: Symbol, other)

@eschnett eschnett added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 10, 2025
@dankamongmen dankamongmen self-assigned this Jan 11, 2025
@dankamongmen dankamongmen added this to the 3.1.0 milestone Jan 11, 2025
@dankamongmen
Copy link
Owner

dankamongmen commented Jan 11, 2025

so, you can't really make a "blitter" out of this. i mean, you can, but it would be a very weird one. the whole reason why you can blit using halves, quadrants, sextants, and octants is that they regularly divide a set of pixels (2x1, 2x2, 3x2, and 4x2 respectively). you just have to solve for colors. these characters are only useful for dividing a cell into 8 columns, and you can only fill up successive columns. do you see? this is the same reason why we don't have a blitter built out of the existing vertical levels.

now, we do use the vertical levels in plots, which is why e.g. NCBLIT_8x1 exists. it probably never should have been called that, except that the plotting engine makes use of e.g. NCBLIT_2x1 (it makes use of any NCBLIT_Xx1). but we don't do horizontal plots. if i ever add them, this would definitely fit right in.

the one place where i can imagine it being useful is in progress bars. but it looks like we're already doing so.

so i'm going to close this, but thanks!

@dankamongmen dankamongmen added the nonfix closed without a successful fix (invalid, wontfix) label Jan 11, 2025
@dankamongmen
Copy link
Owner

so, you can't really make a "blitter" out of this. i mean, you can, but it would be a very weird one. the whole reason why you can blit using halves, quadrants, sextants, and octants is that they regularly divide a set of pixels (2x1, 2x2, 3x2, and 4x2 respectively). you just have to solve for colors. these characters are only useful for dividing a cell into 8 columns, and you can only fill up successive columns. do you see? this is the same reason why we don't have a blitter built out of the existing vertical levels.

there is a case to be made for what i've called "ultrablitter", which would be capable of using all glyphs existing outside of the (unpredictable) font (basically all block and line-drawing characters). basically it would build a histogram of colors, map each pixel to a color, and see which glyph out of all of them was best. but it would be very complex, probably slow, and i doubt you'd get much better imaging that what's already available outside of images constructed to use them. also, the space of available glyphs wold likely be irregular, so you'd have areas of different effective resolutions.

but that's for another day.

@dankamongmen
Copy link
Owner

does this make sense? do you disagree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request nonfix closed without a successful fix (invalid, wontfix)
Projects
None yet
Development

No branches or pull requests

2 participants