IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40943


Ignore:
Timestamp:
Oct 13, 2019, 1:17:00 PM (7 years ago)
Author:
eugene
Message:

let plus and minus adjust tv scale in non-cursor mode; fix overlay in buffered mode; restore buttons in buffered mode

Location:
branches/eam_branches/ohana.20190329/src/kapa2/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20190329/src/kapa2/src/InterpretKeys.c

    r38465 r40943  
    160160      break;
    161161
     162    case XK_plus:
     163    case XK_equal:
    162164    case XK_KP_Add:
    163165      if (modstate & ControlMask) {
     
    171173      Reorient (graphic, image, image[0].picture.Xc, image[0].picture.Yc, 0);
    172174      break;
     175
     176    case XK_minus:
     177    case XK_underscore:
    173178    case XK_KP_Subtract:
    174179      if (modstate & ControlMask) {
  • branches/eam_branches/ohana.20190329/src/kapa2/src/Refresh.c

    r40927 r40943  
    11# include "Ximage.h"
    22
    3 # define USE_BUFFERED_DRAW 0
     3# define USE_BUFFERED_DRAW 1
    44
    55void bDrawXimage (bDrawBuffer *buffer);
     
    4747  for (int i = 0; i < Nsection; i++) {
    4848    Section *section = GetSectionByNumber (i);
    49     DrawImageTool (section->image);
     49
     50    KapaImageWidget *image = section->image;
     51    DrawImageTool (image);
     52
     53    /*** PaintOverlay is called in DrawImage ***
     54    if (!image) continue;
     55    for (int j = 0; j < NOVERLAYS; j++) {
     56      if (image[0].overlay[j].active) {
     57        PaintOverlay (graphic, image, j);
     58      }
     59    }
     60    */
    5061  }
     62
    5163  FlushDisplay ();
    5264}
     
    7183  Nsection = GetNumberOfSections ();
    7284  for (i = 0; i < Nsection; i++) {
    73       section = GetSectionByNumber (i);
    74       DrawSectionBG (graphic, section);
    75       DrawImage (section->image);
    76       DrawGraph (section->graph);
     85    section = GetSectionByNumber (i);
     86    DrawSectionBG (graphic, section);
     87
     88    KapaImageWidget *image = section->image;
     89    DrawImage (image);
     90    DrawImageTool (image);
     91
     92    /*** the overlay is added in DrawImage  ***/
     93    if (image) {
     94      for (int j = 0; j < NOVERLAYS; j++) {
     95        if (image[0].overlay[j].active) {
     96          PaintOverlay (graphic, image, j);
     97        }
     98      }
     99    }
     100
     101    DrawGraph (section->graph);
    77102  }
    78103
  • branches/eam_branches/ohana.20190329/src/kapa2/src/bDrawOverlay.c

    r40558 r40943  
    2424  }
    2525
    26   Xmin = 0;
    27   Ymin = 0;
    28   Xmax = image[0].picture.dx;
    29   Ymax = image[0].picture.dy;
     26  // Xmin = 0;
     27  // Ymin = 0;
     28  // Xmax = image[0].picture.dx;
     29  // Ymax = image[0].picture.dy;
     30
     31  Xmin = image[0].picture.x;
     32  Ymin = image[0].picture.y;
     33  Xmax = image[0].picture.x + image[0].picture.dx; // maybe this should be just dx?
     34  Ymax = image[0].picture.y + image[0].picture.dy;
    3035
    3136  if (N == INFRONT) {
     
    3540
    3641  for (i = 0; i < image[0].overlay[N].Nobjects; i++) {
    37     Image_to_Picture (&X, &Y, image[0].overlay[N].objects[i].x, image[0].overlay[N].objects[i].y, &image[0].picture);
     42    // XXX the 0.5,0.5 offset is apparently needed here.
     43    // work on rationalizing these functions in the context of their different plotting types
     44    Image_to_Screen (&X, &Y, image[0].overlay[N].objects[i].x - 0.5, image[0].overlay[N].objects[i].y - 0.5, &image[0].picture);
    3845    dX = image[0].overlay[N].objects[i].dx * expand;
    3946    dY = image[0].overlay[N].objects[i].dy * expand;
Note: See TracChangeset for help on using the changeset viewer.