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 general ncplane_line_yx() #356

Closed
dankamongmen opened this issue Feb 18, 2020 · 2 comments
Closed

Add general ncplane_line_yx() #356

dankamongmen opened this issue Feb 18, 2020 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request nonfix closed without a successful fix (invalid, wontfix)
Milestone

Comments

@dankamongmen
Copy link
Owner

We have ncplane_hline() and ncplane_vline() and they're both kinda dumb. Why don't we just have an ncplane_line_yx() and figure things out for ourselves? These limiting cases would be the easiest to solve for fully general line-drawing (where, of course, the biggest question is: what glyphs do we use at what angles?).

We can leave ncplane_hline() and friends as wrappers, of course.

@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
Copy link
Owner Author

// from current cursor position
ncplane_line_yx(struct ncplane* n, int y, int x, const cell* c, uint64_t destchan);

that ought handle it, methinks. the idea of using distinct glyphs at different points is crazy. let the user pick one and be done with it. we draw from the current cursor position, and the first cell matches c exactly. further cells continue to use the EGC and attributes from c, but lerp towards destchan. if destchan == c->channels, the line is a single color.

yeah, that's good.

@dankamongmen dankamongmen added this to the 1.3.0 milestone Feb 23, 2020
@dankamongmen dankamongmen changed the title Add general ncplane_line_yx() Add general ncplane_line_yx() Mar 3, 2020
@dankamongmen dankamongmen removed this from the 1.3.0 milestone Mar 8, 2020
@dankamongmen dankamongmen added this to the 1.7.0 milestone Jul 5, 2020
@dankamongmen dankamongmen added the nonfix closed without a successful fix (invalid, wontfix) label Jul 5, 2020
@dankamongmen
Copy link
Owner Author

I don't think this will be genuinely useful. Tabling it for now.

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

1 participant