mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
pixelplot: put it at the correct x + i #1382
This commit is contained in:
parent
04a0101e20
commit
c77978d721
@ -164,15 +164,13 @@ int redraw_pixelplot_##T(nc##X##plot* ncp){ \
|
||||
/*fprintf(stderr, "WRITING TO y/x %d/%d (%zu)\n", y, x, dimx * dimy * scale * states); */\
|
||||
if(egcidx){ \
|
||||
for(size_t yy = 0 ; yy < states ; ++yy){ \
|
||||
for(int xx = 0 ; xx < scale ; ++xx){ \
|
||||
int poff = x * scale + xx + ((y * states + yy) * dimx * scale); \
|
||||
calc_gradient_channels(&channels, ncp->plot.minchannels, ncp->plot.minchannels, \
|
||||
ncp->plot.maxchannels, ncp->plot.maxchannels, \
|
||||
y * states + yy, x, dimy * states, dimx); \
|
||||
uint32_t color = ncchannels_fg_rgb(channels); \
|
||||
ncpixel_set_a(&color, 0xff); \
|
||||
pixels[poff] = color; \
|
||||
} \
|
||||
int poff = x * scale + i + ((y * states + yy) * dimx * scale); \
|
||||
calc_gradient_channels(&channels, ncp->plot.minchannels, ncp->plot.minchannels, \
|
||||
ncp->plot.maxchannels, ncp->plot.maxchannels, \
|
||||
y * states + yy, x, dimy * states, dimx); \
|
||||
uint32_t color = ncchannels_fg_rgb(channels); \
|
||||
ncpixel_set_a(&color, 0xff); \
|
||||
pixels[poff] = color; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user