IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25295


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

do not display image without pixels

File:
1 edited

Legend:

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

    r21153 r25295  
    4848
    4949  // set the center and expansion for the pictures:
    50   image[0].picture.X      = 0.0;
    51   image[0].picture.Y      = 0.0;
     50  image[0].picture.Xc     = 0.0;
     51  image[0].picture.Yc     = 0.0;
    5252  image[0].picture.expand = 1;
    5353  image[0].picture.flipx  = FALSE;
    5454  image[0].picture.flipy  = FALSE;
    5555
    56   image[0].zoom.X         = 0.0;
    57   image[0].zoom.Y         = 0.0;
    58   image[0].zoom.expand    = +5;
     56  image[0].zoom.Xc        = 0.0;
     57  image[0].zoom.Yc        = 0.0;
     58  image[0].zoom.expand    = 5;
    5959  image[0].zoom.flipx     = FALSE;
    6060  image[0].zoom.flipy     = FALSE;
    6161
    62   image[0].wide.X         = 0.0;
    63   image[0].wide.Y         = 0.0;
     62  image[0].wide.Xc        = 0.0;
     63  image[0].wide.Yc        = 0.0;
    6464  image[0].wide.expand    = -5;
    6565  image[0].wide.flipx     = FALSE;
     
    144144                  image[0].picture.dx+1, image[0].picture.dy+1);
    145145 
    146   XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
    147              image[0].picture.pix, 0, 0,
    148              image[0].picture.x + 1, image[0].picture.y + 1,
    149              image[0].picture.dx, image[0].picture.dy);
     146  if (image[0].picture.pix) {
     147    XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
     148               image[0].picture.pix, 0, 0,
     149               image[0].picture.x + 1, image[0].picture.y + 1,
     150               image[0].picture.dx, image[0].picture.dy);
     151  }
    150152
    151153  for (i = 0; i < NOVERLAYS; i++) {
     
    156158
    157159  if (image[0].location) {
    158     XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
    159                image[0].cmapbar.pix, 0, 0,
    160                image[0].cmapbar.x, image[0].cmapbar.y,
    161                image[0].cmapbar.dx, image[0].cmapbar.dy);
    162 
    163     XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
    164                image[0].wide.pix, 0, 0,
    165                image[0].wide.x, image[0].wide.y,
    166                image[0].wide.dx, image[0].wide.dy);
     160    if (image[0].cmapbar.pix) {
     161      XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
     162                 image[0].cmapbar.pix, 0, 0,
     163                 image[0].cmapbar.x, image[0].cmapbar.y,
     164                 image[0].cmapbar.dx, image[0].cmapbar.dy);
     165    }
     166    if (image[0].wide.pix) {
     167        XPutImage (graphic[0].display, graphic[0].window, graphic[0].gc,
     168                   image[0].wide.pix, 0, 0,
     169                   image[0].wide.x, image[0].wide.y,
     170                   image[0].wide.dx, image[0].wide.dy);
     171    }
    167172
    168173    CrossHairs (graphic, &image[0].zoom);
Note: See TracChangeset for help on using the changeset viewer.