Index: picedit.c ================================================================== --- picedit.c +++ picedit.c @@ -293,10 +293,49 @@ int x,y; for(y=0;y1.0) continue; + v=rx*sqrt(1.0-v); + x=round(cx-v); if(x>=0 && x=0 && x1.0) continue; + v=ry*sqrt(1.0-v); + y=round(cy-v); if(y>=0 && y=0 && ydata+pict[sel]->size,pict[sel]->size,x,y,xx,yy,cc); if(i&1) xx=x,yy=y; break; - case 4: // Rect + case 4: // Rectangle if(i==1) { xx=x; yy=y; } else if(xx!=-1) { p=pict[sel]->data+(j=pict[sel]->size); if(xxdata+(j=pict[sel]->size); if(xxdata+pict[sel]->size,pict[sel]->size,x,y,(x-xx)*(x-xx)+(y-yy)*(y-yy),cc); } else if(i==3) { draw_circle(pict[sel]->data+pict[sel]->size,pict[sel]->size,xx,yy,(x-xx)*(x-xx)+(y-yy)*(y-yy),cc); } break; - case 7: // Fillcircle + case 7: // Fill circle if(i==1) { xx=x; yy=y; } else if(i==2) { fill_circle(pict[sel]->data+pict[sel]->size,pict[sel]->size,x,y,(x-xx)*(x-xx)+(y-yy)*(y-yy),cc); } else if(i==3) { fill_circle(pict[sel]->data+pict[sel]->size,pict[sel]->size,xx,yy,(x-xx)*(x-xx)+(y-yy)*(y-yy),cc); } + break; + case 8: // Ellipse + if(i==1) { + xx=x; yy=y; + } else if(xx!=-1) { + draw_ellipse(pict[sel]->data+pict[sel]->size,pict[sel]->size,x,y,xx,yy,cc); + } + break; + case 9: // Fill ellipse + if(i==1) { + xx=x; yy=y; + } else if(xx!=-1) { + fill_ellipse(pict[sel]->data+pict[sel]->size,pict[sel]->size,x,y,xx,yy,cc); + draw_ellipse(pict[sel]->data+pict[sel]->size,pict[sel]->size,x,y,xx,yy,cc); + } break; } goto redraw; } break; Index: picedit.doc ================================================================== --- picedit.doc +++ picedit.doc @@ -144,10 +144,12 @@ Click the left button at the centre of the circle and the right button at the radius, or you can click the left button at the radius and the middle button at the centre. Hollow ellipse (E) - + Click the left button on one corner of the bounding rectangle of the + ellipse, and then click the middle or right button on the other side. Filled ellipse (S) - + Click the left button on one corner of the bounding rectangle of the + ellipse, and then click the middle or right button on the other side.