238 {
239 unsigned y,
x, dimy, dimx;
240 int offy, offx;
242 offy = p->absy - dstabsy;
243 offx = p->absx - dstabsx;
244
245
246 unsigned starty, startx;
247 if(offy < 0){
248 starty = -offy;
249 }else{
250 starty = 0;
251 }
252 if(offx < 0){
253 startx = -offx;
254 }else{
255 startx = 0;
256 }
257
258
259
260 if(p->sprite){
261 if(pgeo_changed){
262
263 sprixel_rescale(p->sprite, ncplane_pile(p)->cellpxy, ncplane_pile(p)->cellpxx);
264 }
265 paint_sprixel(p, rvec, starty, startx, offy, offx, dstleny, dstlenx);
266
267 if(p->sprite->next){
268 p->sprite->next->prev = p->sprite->prev;
269 }
270 if(p->sprite->prev){
271 p->sprite->prev->next = p->sprite->next;
272 }else{
273 ncplane_pile(p)->sprixelcache = p->sprite->next;
274 }
275
276 if(*sprixelstack){
277 (*sprixelstack)->prev = p->sprite;
278 }
279 p->sprite->next = *sprixelstack;
280 p->sprite->prev =
NULL;
281 *sprixelstack = p->sprite;
282 return;
283 }
284 for(
y = starty ;
y < dimy ; ++
y){
285 const int absy =
y + offy;
286
287 if(absy >= dstleny || absy < 0){
288 break;
289 }
290 for(
x = startx ;
x < dimx ; ++
x){
291 const int absx =
x + offx;
292 if(absx >= dstlenx || absx < 0){
293 break;
294 }
296
298 if(nccell_wide_right_p(targc)){
299 continue;
300 }
301
304 if(nccell_fg_default_p(vis)){
306 }
311 }
315
316
317
320 }
321 }
322
323
324
325
326
327
330
331
332
333
335 if(nccell_bg_default_p(vis)){
337 }
341 }else{
342 if(nccell_fg_default_p(vis)){
344 }
349 }
350 }
351
352
353
354
355
356
357
358
361 if(vis->
gcluster == 0 && !nccell_double_wide_p(vis)){
363 }
364
365
368
370 }
372
373
374 if(nccell_double_wide_p(vis)){
375
376 if(absx >= dstlenx - 1){
379
381
384 }else{
387 }
388 }else{
391 }
393 }else if(nccell_wide_right_p(vis)){
396 }
397 }
398 }
399 }
400}
notcurses * ncplane_notcurses(const ncplane *n)
void ncplane_dim_yx(const ncplane *n, unsigned *rows, unsigned *cols)
#define NCALPHA_HIGHCONTRAST
int sprixel_rescale(sprixel *spx, unsigned ncellpxy, unsigned ncellpxx)