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
Can't do a glyph-transparent varying-color plane #395
Comments
maaaaaaaaaaaaaaybe we say "we apply the color on a null glyph, so long as the base cell is also a null glpyh?" it's not particularly nice, but it would work for some cases... |
I think we can actually work around this pretty easily by taking a bit from the 6 reserved bits we have left in the channels variable. If you want a hard passthrough, indicate it there. Alternatively, we could employ some control character for this... yeah, either of those solutions ought work. |
We need to work this out before the 2.0 API freeze. |
What if we said "to get the base character, you need to be all 0s not just in your glyph, but in your colors as well"? would that work? i don't see any immediate problems with it, it avoids overloading control characters, and it uses no new channel bits. there might be some case i'm missing, though. i think i'll make this change, and see if the demos are at all affected by it. if so, we might take another look. if not, i'm going to assume this is fine, and keep the change. i'm just worried there might be a technique i'm overlooking. this is just as powerful as the other two solutions, without any weird overloads, and i think it even logically makes sense: if i set a color, i intend for that color to be used! the only exception would be if i've e.g. stained a large area. but resetting the colors is just as easy as resetting the glyphs in such a case...yeah, i think i like this solution. |
The other thing to consider is...what if I want the default to stain, as well? I suppose in that case you can always set the base char to default, but that kills the base char for other purposes. Maybe we do want to go ahead and use those two channel bits? But then what about the nonsense case of glyph set + force bit? |
I think this is almost the right approach, but with one small tweak: rather than checking for the default color, check for whether we're non-transparent. If the channel is |
Either way, we're left with some value that we can't override the base cell with...but that's still better than the current situation, where we can't override the base cell with any colors. I think we'll want to set certain areas transparent much more than we'll want set certain areas default. Let's go with the plan from earlier, where you must be the default color to fall through to base cell. That fits in better with the idea of a zero-default, after all. Neither way is particularly elegant. |
OK, I have implemented this via deciding between the viscell and the basecell at each of the three steps of |
chasing down this here's what we see from
Why on earth is the target address changing? That's what's giving rise to our problem -- we suddenly are targeting this other address, which is freshly initialized to 0x60000000. I don't at all understand why the target address is changing. The first two planes (menu and shifted dup plane, the latter containing our output) hit the same place (0x55bb66fadde0), and leave |
Wait, that interpretation is flawed. menu plane isn't overlapping this coordinate. Let me get another set.... Ahhh, ok, the initial output was from a prior render. Here we go:
All three writes are now to the correct (same, at least) address. It would appear that our |
Yep, that was it, got it. |
While working on the book, I realized a major oversight: you can't do a glyph-transparency having more than one color!
In the uniblock demo and trans demo, we do a plane which is glyph-transparent (all
gcluster
values are 0), but has a base cell color, thus changing the color of the glyphs underneath (but not the glyphs themselves). this is well and good.but let's say you want to apply a gradient in the same way, using a glyph-transparent plane (i.e. not simply staining the plane with the glyphs). you'd set each cell's color, set it to BLEND or OPAQUE, and set each gcluster to 0, right? wrong. any cell with a 0 gcluster uses the base cell in its entirety. and sometimes this is what we want -- we want them all to have the same color and glyph, easy, set the base cell.
you can't just set the gclusters to space, because that would block the glyphs underneath (we can't change that semantic -- you want it, or printing becomes crazy). i don't like the idea of getting rid of the base cell (useful for automatic handling of resizes) or anything like that.
ugh. we could maybe do something horrible like "if gcluster==1, apply only glyph". that's just ghastly :(. think about it some more.
The text was updated successfully, but these errors were encountered: