IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38312


Ignore:
Timestamp:
May 24, 2015, 10:17:09 AM (11 years ago)
Author:
eugene
Message:

fix segfault for too small window

Location:
branches/eam_branches/ipp-20150419/Ohana/src/kapa2/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src/kapa2/src/SetGraphSize.c

    r34088 r38312  
    2121  double X0 = graphic[0].dx * section[0].x  + x0;
    2222  double Y0 = graphic[0].dy * section[0].y  + y0;
    23   double dX = graphic[0].dx * section[0].dx - x1;
    24   double dY = graphic[0].dy * section[0].dy - y1;
     23  double dX = MAX(graphic[0].dx * section[0].dx - x1, 1);
     24  double dY = MAX(graphic[0].dy * section[0].dy - y1, 1);
    2525
    2626  /* define locations of coordinate axes */
  • branches/eam_branches/ipp-20150419/Ohana/src/kapa2/src/SetImageSize.c

    r29539 r38312  
    306306        image[0].picture.x = Xs + PAD1;
    307307        image[0].picture.y = Ys + 2*PAD1 + COLORPAD;
    308         image[0].picture.dx = dX - 3*PAD1 - 1 - ZOOM_X;
    309         image[0].picture.dy = dY - 3*PAD1 - 1 - COLORPAD;
     308        image[0].picture.dx = MAX(dX - 3*PAD1 - 1 - ZOOM_X, 1);
     309        image[0].picture.dy = MAX(dY - 3*PAD1 - 1 - COLORPAD, 1);
    310310      }
    311311
Note: See TracChangeset for help on using the changeset viewer.