IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32848


Ignore:
Timestamp:
Dec 2, 2011, 8:05:24 AM (14 years ago)
Author:
eugene
Message:

fix window for png / ps

Location:
branches/eam_branches/ipp-20111122/Ohana/src/kapa2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/kapa2/include/prototypes.h

    r32695 r32848  
    9999int           ListSection         PROTO((int sock));
    100100void          SetSectionSizes     PROTO((Section *section));
     101int           SectionMinBoundary  PROTO((Graphic *graphic));
    101102
    102103KapaGraphWidget *InitGraph        PROTO((void));
  • branches/eam_branches/ipp-20111122/Ohana/src/kapa2/src/PNGit.c

    r31665 r32848  
    2222
    2323  graphic = GetGraphic();
     24
     25  // limit the png window to the min needed to contain the active graphic regions
     26  SectionMinBoundary (graphic);
    2427
    2528  f = fopen (filename, "w");
     
    8184  /* see docs for write-row-callback to provide progress info */
    8285  if (haveImage) {
    83     png_set_IHDR (png_ptr, info_ptr, graphic->dx, graphic->dy, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
     86    png_set_IHDR (png_ptr, info_ptr, graphic->dxwin, graphic->dywin, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
    8487    png_set_sRGB (png_ptr, info_ptr, PNG_sRGB_INTENT_ABSOLUTE);
    8588  } else {
    86     png_set_IHDR (png_ptr, info_ptr, graphic->dx, graphic->dy, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
     89    png_set_IHDR (png_ptr, info_ptr, graphic->dxwin, graphic->dywin, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
    8790    png_set_PLTE (png_ptr, info_ptr, palette, Npalette);
    8891  }
  • branches/eam_branches/ipp-20111122/Ohana/src/kapa2/src/Sections.c

    r32695 r32848  
    245245    int Xe = 0;
    246246    int Ye = 0;
     247
     248# if (1)
     249    graphic->xwin  = 0;
     250    graphic->ywin  = 0;
     251    graphic->dxwin = graphic->dx;
     252    graphic->dywin = graphic->dy;
     253    return TRUE;
     254# endif
    247255
    248256    // the boundary for a single section should probably be adjusted depending on the
  • branches/eam_branches/ipp-20111122/Ohana/src/kapa2/src/bDrawIt.c

    r32695 r32848  
    1212
    1313  black = KapaColorByName ("black");
    14 
    15   // SectionMinBoundary (graphic);
    1614
    1715  // if we want to trim, we'll need to carry about the start in graphic coords and
Note: See TracChangeset for help on using the changeset viewer.