IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 5, 2010, 10:04:42 PM (16 years ago)
Author:
eugene
Message:

handle errors in dvo I/O functions; better support for DIS images; merge in high-speed mods from Niall; systematic errors in astrometry (somewhat hackish); add fits I/O option to succeed reading a short file (padding as needed); various kapa improvements (frames consistent in X, PS, PNG; fix tick label signif digits; add function for image overlays; better thick box lines; PNG of the image); bDrawBuffer mods to drop static buffer and refer to passed through buffer; ResizeByImage; DefineSectionByImage; buutos to do png & jpeg; add program roc for raid over cluster; support for mosaic photcodes in dvo image plot; densify; section name [-image x y] : width based on current image; resize -by-image; threaded addstar -resort; threaded dvomerge; dvorepair; dvoverify; dvomerge continue; dvomerge from list (of regions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/src/bDrawOverlay.c

    r25757 r29938  
    44static char name[4][16] = {"red", "green", "blue", "yellow"};
    55
    6 void bDrawOverlay (KapaImageWidget *image, int N) {
     6void bDrawOverlay (bDrawBuffer *buffer, KapaImageWidget *image, int N) {
    77
    88  int i;
     
    1414  /* translate color to bDrawColors : image[0].overlay[N].color */
    1515  color = KapaColorByName (name[N]);
    16   bDrawSetStyle (color, 0, 0);
     16  bDrawSetStyle (buffer, color, 0, 0);
    1717 
    1818  expand = 1.0;
     
    5757    switch (image[0].overlay[N].objects[i].type) {
    5858      case KII_OVERLAY_LINE:
    59         bDrawLine (X, Y, (X+dX), (Y+dY));
     59        bDrawLine (buffer, X, Y, (X+dX), (Y+dY));
    6060        break;
    6161      case KII_OVERLAY_TEXT:
    62         bDrawRotText (X, Y, image[0].overlay[N].objects[i].text, 8, 0.0);
     62        bDrawRotText (buffer, X, Y, image[0].overlay[N].objects[i].text, 8, 0.0);
    6363        break;
    6464      case KII_OVERLAY_BOX:
    6565        dx = MAX (abs(dX),2) / 2;
    6666        dy = MAX (abs(dY),2) / 2;
    67         bDrawRectOpen ((X-dx), (Y-dy), (X+dx), (Y+dy));
    68         // bDrawRectOpen ((X-dx), (Y-dy), (X), (Y));
     67        bDrawRectOpen (buffer, (X-dx), (Y-dy), (X+dx), (Y+dy));
     68        // bDrawRectOpen (buffer, (X-dx), (Y-dy), (X), (Y));
    6969        break;
    7070      case KII_OVERLAY_CIRCLE:
     
    7272        dy = MAX (abs(dY),2);
    7373        if (image[0].overlay[N].objects[i].angle == 0.0) {
    74           bDrawArc (X, Y, dx, dy, 0, 360);
     74          bDrawArc (buffer, X, Y, dx, dy, 0, 360);
    7575        } else {
    7676          // moderately-stupid rotated ellipse drawing:
     
    8888            x1 = X + pX*dx*cos(t)*cs - pX*dy*sin(t)*sn;
    8989            y1 = Y + pY*dx*cos(t)*sn + pY*dy*sin(t)*cs;
    90             bDrawLine (x0, y0, x1, y1);
     90            bDrawLine (buffer, x0, y0, x1, y1);
    9191            x0 = x1;
    9292            y0 = y1;
     
    101101 
    102102  /* translate color to bDrawColors : image[0].overlay[N].color */
    103   bDrawSetStyle (color, 0, 0);
     103  bDrawSetStyle (buffer, color, 0, 0);
    104104}
    105105
Note: See TracChangeset for help on using the changeset viewer.