purge old rotate implementation #351

pull/399/head
nick black 5 years ago
parent 4e58747709
commit e2459ac1a4
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1924,41 +1924,3 @@ void ncplane_translate(const ncplane* src, const ncplane* dst,
*x = src->absx - dst->absx + *x;
}
}
// generate a temporary plane that can hold the contents of n, rotated 90°
static ncplane* rotate_plane(const ncplane* n){
int absy, absx;
ncplane_yx(n, &absy, &absx);
int dimy, dimx;
ncplane_dim_yx(n, &dimy, &dimx);
const int newy = dimx / 2;
const int newx = dimy * 2;
ncplane* newp = ncplane_new(n->nc, newy, newx, absy, absx, n->userptr);
return newp;
}
int ncplane_rotate_cw(ncplane* n){
ncplane* newp = rotate_plane(n);
if(newp == NULL){
return -1;
}
int dimy, dimx;
ncplane_dim_yx(n, &dimy, &dimx);
// FIXME map n to newp
// FIXME resize n
// FIXME copy newp to n
return 0;
}
int ncplane_rotate_ccw(ncplane* n){
ncplane* newp = rotate_plane(n);
if(newp == NULL){
return -1;
}
int dimy, dimx;
ncplane_dim_yx(n, &dimy, &dimx);
// FIXME map n to newp
// FIXME resize n
// FIXME copy newp to n
return 0;
}

Loading…
Cancel
Save