IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2008, 11:06:05 AM (18 years ago)
Author:
eugene
Message:

adding line weight and color to box frames

Location:
trunk/Ohana/src/kapa2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/include/structures.h

    r16810 r17530  
    138138  char isaxis, areticks, islabel, islog;
    139139  double fx, dfx, fy, dfy;  /* axis location on graphic */
     140  double lweight;
     141  int color;
    140142} Axis;
    141143
  • trunk/Ohana/src/kapa2/src/DrawFrame.c

    r17466 r17530  
    88 
    99  int i, fx, fy, dfx, dfy, P, IsLabel, IsMajor;
    10   double range, major, minor, first, next;
     10  double range, major, minor, first, next, lweight;
    1111
    1212  graphic = GetGraphic();
    13 
    14   // XXX why is this called for every redraw?
    15   DrawRotTextInit (graphic->display, graphic->window, graphic->gc, graphic->fore, graphic->back);
    1613
    1714  /* each axis is drawn independently, but ticks and labels are placed according to
     
    2320    dfy = graph[0].axis[i].dfy;
    2421    P = hypot ((double)graph[0].axis[(i+1)%2].dfx, (double)graph[0].axis[(i+1)%2].dfy);
     22
     23    lweight = MAX (0, MIN (10, graph[0].axis[i].lweight));
     24    XSetLineAttributes (graphic->display, graphic->gc, lweight, LineSolid, CapNotLast, JoinMiter);
     25    XSetForeground (graphic->display, graphic->gc, graphic->color[graph[0].axis[i].color]);
     26    DrawRotTextInit (graphic->display, graphic->window, graphic->gc, graphic->color[graph[0].axis[i].color], graphic->back);
    2527
    2628    if (graph[0].axis[i].isaxis) {
  • trunk/Ohana/src/kapa2/src/LoadFrame.c

    r14590 r17530  
    33int LoadFrame (int sock) {
    44 
    5   int i;
     5  int i, color;
    66  char Axis[16], Labels[16], Ticks[16];
     7  double lweight;
    78  Section *section;
    89  KapaGraphWidget *graph;
     
    2425  graph[0].axis[2].max = graph[0].axis[0].max;
    2526 
     27  KiiScanMessage (sock, "%lf %d", &lweight, &color);
     28
    2629  KiiScanMessage (sock, "%s %s %s", Axis, Labels, Ticks);
    2730
    2831  for (i = 0; i < 4; i++) {
     32    graph[0].axis[i].lweight = lweight;
     33    graph[0].axis[i].color = color;
     34
    2935    switch (Axis[i]) {
    3036    case '0':
Note: See TracChangeset for help on using the changeset viewer.