iterm: position cursor before draw

pull/1937/head
nick black 3 years ago
parent 7ed7827aca
commit c5bef4a2af
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -10,27 +10,32 @@
// yank a cell out of the PNG by setting all of its alphas to 0. the alphas
// will be preserved in the auxvec.
int iterm_wipe(sprixel* s, int ycell, int xcell){
return 0;
(void)s; // FIXME
(void)ycell;
(void)xcell;
return -1;
}
// build a cell of the PNG back up by copying auxvec alphas to it.
int iterm_rebuild(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
return 0;
(void)s; // FIXME
(void)ycell;
(void)xcell;
(void)auxvec;
return -1;
}
// spit out the control sequence and data.
int iterm_draw(const ncpile *p, sprixel* s, FILE* out, int y, int x){
if(goto_location(p->nc, out, y, x)){
return -1;
}
if(fwrite(s->glyph, s->glyphlen, 1, out) != 1){
return -1;
}
return s->glyphlen;
}
// damage any cells underneath the graphic, destroying it.
int iterm_scrub(const ncpile* p, sprixel* s){
return 0;
}
static int
write_iterm_graphic(sprixel* s, const void* data, int leny, int stride, int lenx){
s->glyph = NULL;

Loading…
Cancel
Save