mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
plot: use at least maxchannel #136
This commit is contained in:
parent
68b4ba1706
commit
8f65958a53
@ -36,6 +36,9 @@ int main(void){
|
||||
popts.detectdomain = true;
|
||||
std::array<struct ncplot*, 5> plots;
|
||||
for(auto i = 0u ; i < plots.size() ; ++i){
|
||||
popts.maxchannel = 0;
|
||||
channels_set_fg_rgb(&popts.maxchannel, random() % 256, random() % 256, random() % 256);
|
||||
channels_set_fg_rgb(&popts.minchannel, random() % 256, random() % 256, random() % 256);
|
||||
popts.gridtype = static_cast<ncgridgeom_e>(i);
|
||||
plots[i] = ncplot_create(planes[i], &popts);
|
||||
}
|
||||
|
@ -145,6 +145,7 @@ redraw_plot(ncplot* n){
|
||||
if(gval > n->maxy){
|
||||
gval = n->maxy;
|
||||
}
|
||||
ncplane_set_fg(ncplot_plane(n), channels_fg(n->maxchannel)); // FIXME lerp!
|
||||
// starting from the least-significant row, progress in the more significant
|
||||
// direction, drawing egcs from the grid specification, aborting early if
|
||||
// we can't draw anything in a given cell.
|
||||
|
Loading…
Reference in New Issue
Block a user