mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
ncplot: print EGC before breaking on small glyph #605
This commit is contained in:
parent
532c1689a4
commit
25fee034cb
@ -1,4 +1,4 @@
|
|||||||
#include "cpp.h"
|
#include "plot.h"
|
||||||
|
|
||||||
using ncuplot = struct ncuplot {
|
using ncuplot = struct ncuplot {
|
||||||
ncppplot<uint64_t> n;
|
ncppplot<uint64_t> n;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "notcurses/notcurses.h"
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include "notcurses/notcurses.h"
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
ncgridgeom_e geom;
|
ncgridgeom_e geom;
|
||||||
@ -200,22 +200,22 @@ class ncppplot {
|
|||||||
}else{
|
}else{
|
||||||
egcidx = (gvals[i] - intervalbase) / interval;
|
egcidx = (gvals[i] - intervalbase) / interval;
|
||||||
}
|
}
|
||||||
//fprintf(stderr, "egcidx: %zu\n", egcidx);
|
//fprintf(stderr, "%d/%d ibase: %f egcidx: %zu\n", dimy - y - 1, x, intervalbase, egcidx);
|
||||||
if(egcidx >= states){
|
if(egcidx >= states){
|
||||||
egcidx = states - 1;
|
egcidx = states - 1;
|
||||||
|
done = false;
|
||||||
}
|
}
|
||||||
done = false;
|
|
||||||
sumidx += egcidx;
|
sumidx += egcidx;
|
||||||
}else{
|
}else{
|
||||||
egcidx = 0;
|
egcidx = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(done){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(ncplane_putwc_yx(ncp, dimy - y - 1, x, egc[sumidx]) <= 0){
|
if(ncplane_putwc_yx(ncp, dimy - y - 1, x, egc[sumidx]) <= 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if(done){
|
||||||
|
break;
|
||||||
|
}
|
||||||
if(exponentiali){
|
if(exponentiali){
|
||||||
intervalbase = miny + pow(interval, y * states);
|
intervalbase = miny + pow(interval, y * states);
|
||||||
}else{
|
}else{
|
@ -1,5 +1,5 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "cpp.h"
|
#include "plot.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user