IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36488


Ignore:
Timestamp:
Feb 6, 2014, 12:40:40 PM (12 years ago)
Author:
eugene
Message:

avoid plotting out of bounds in png

Location:
trunk/Ohana/src/libkapa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libkapa/src/KapaWindow.c

    r35761 r36488  
    100100  graphdata[0].coords.pc1_1 = graphdata[0].coords.pc2_2 = 1.0;
    101101  graphdata[0].coords.pc1_2 = graphdata[0].coords.pc2_1 = 0.0;
    102   strcpy (graphdata[0].coords.ctype, "RA---LIN");
     102  strcpy (graphdata[0].coords.ctype, "DEC--LIN");
    103103  graphdata[0].coords.crval1 = 0.0;
    104104  graphdata[0].coords.crval2 = 0.0;
  • trunk/Ohana/src/libkapa/src/bDrawFuncs.c

    r33956 r36488  
    247247  int i;
    248248
     249  if (Y <  0) return;
     250  if (Y >= buffer[0].Ny) return;
     251
    249252  for (i = X1; i < X2; i++) {
     253    if (i <  0) continue;
     254    if (i >= buffer[0].Nx) continue;
    250255    if (buffer[0].Nbyte == 1) {
    251256      buffer[0].pixels[Y][i] = buffer->bColor;
     
    263268  int i;
    264269
     270  if (X <  0) return;
     271  if (X >= buffer[0].Nx) return;
     272
    265273  for (i = Y1; i < Y2; i++) {
     274    if (i <  0) continue;
     275    if (i >= buffer[0].Ny) continue;
    266276    if (buffer[0].Nbyte == 1) {
    267277      buffer[0].pixels[i][X] = buffer->bColor;
Note: See TracChangeset for help on using the changeset viewer.