IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25294


Ignore:
Timestamp:
Sep 8, 2009, 4:25:23 PM (17 years ago)
Author:
eugene
Message:

fix angle of ellipse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/Ohana/src/kapa2/src/PaintOverlay.c

    r25277 r25294  
    99 
    1010  XSetForeground (graphic[0].display, graphic[0].gc, image[0].overlay[N].color);
    11   XSetLineAttributes (graphic->display, graphic->gc, 2, LineSolid, CapNotLast, JoinMiter);
     11  XSetLineAttributes (graphic->display, graphic->gc, 1, LineSolid, CapNotLast, JoinMiter);
    1212 
    1313  expand = 1.0;
     
    7272          double sn = sin(angle);
    7373          x0 = X + pX*dx*cs;
    74           y0 = Y - pY*dx*sn;
     74          y0 = Y + pY*dx*sn;
    7575          // XXX dt should be based on the size of the ellipse...
    7676          // 0.10 -> 60 segments on the ellipse
    7777          # define DT 0.1
    7878          for (t = DT; t < 2*M_PI + DT; t+=DT) {
    79             x1 = X + pX*dx*cos(t)*cs + pX*dy*sin(t)*sn;
    80             y1 = Y - pY*dx*cos(t)*sn + pY*dy*sin(t)*cs;
     79            x1 = X + pX*dx*cos(t)*cs - pX*dy*sin(t)*sn;
     80            y1 = Y + pY*dx*cos(t)*sn + pY*dy*sin(t)*cs;
    8181            XDrawLine (graphic[0].display, graphic[0].window, graphic[0].gc, x0, y0, x1, y1);
    8282            x0 = x1;
Note: See TracChangeset for help on using the changeset viewer.