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 ability to change glyph but retain coloring/styling #352

Closed
dankamongmen opened this issue Feb 18, 2020 · 1 comment
Closed

Add ability to change glyph but retain coloring/styling #352

dankamongmen opened this issue Feb 18, 2020 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dankamongmen
Copy link
Owner

I suppose this is the glyph analogue to ncplane_stain() (see #347 ). Add a means by which glyphs can be changed, but colors can be retained. Note that this is not going to work exactly as expected on top of ncvisuals, where the glyph is part of the "color". We're already cool with that in the case of transparent text atop an ncvisual, though.

This is basically equivalent (modulo plane movement etc.) to making a transparent plane atop what we're changing, and writing transparent text.

@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 18, 2020
@dankamongmen dankamongmen self-assigned this Feb 18, 2020
@dankamongmen dankamongmen added this to the 1.3.0 milestone Feb 18, 2020
@dankamongmen
Copy link
Owner Author

So by "change glyph", the primary way that's done is with e.g. ncplane_putc(). Are we suggesting there ought be a way to invoke this family of functions such that the channels are unaffected? That starts a pretty nasty combinatorial explosion--we already have _yx() and _aligned() calling down to a common form for each of these.

I'm thinking maybe #361 is enough to throw together a generic solution for this. It can maybe be made available as an inline, but I don't even like that clogging of the namespace for this rare need.

Yeah, I'll add a notcurses_putc_stainable() to do a single EGC, since there is no notcurses_putc_aligned(). Beyond that, whip up a transparent ncplane, write to it, and merge it down. It's slower, but this just doesn't seem like something that will happen often.

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
Projects
None yet
Development

No branches or pull requests

1 participant