Beispiel #1
0
static void Dimensions(void)
{
    xrange = sampletable[ nsamples - 1 ]-sampletable[0]; 
 
    if (fixedYRange >= 0) {
      yrange = fixedYRange;
    }
    else {
      if (showMax) 
	yrange = maxDouble(maxValue, MaxCombinedHeight()); /* If the stack is large then maxValue<MaxCombinedHeight. */
      else
	yrange = MaxCombinedHeight();
    }

    graphwidth  = titlewidth - graphx0 - KeyWidth();
    graphheight = borderheight - titleheight - (2 * borderspace) - graphy0;

    #if DEBUG_DIMENSIONS
    printf("xrange: %5.2f, yrange: %5.2f, graphwidth: %5.2f and graphheight: %5.2f \n", xrange, yrange, graphwidth, graphheight);
    printf("MaxCombinedHeight: %5.2f\n", MaxCombinedHeight());
    printf("maxValue: %5.2f\n", maxValue);
    #endif
    
    return;
}
Beispiel #2
0
void
Dimensions(void)
{
    boolish keyOnGraph;

    xrange = samplemap[nsamples - 1] - samplemap[0];
    xrange = max(xrange, auxxrange);
    if (xrange == 0.0) xrange = 1.0;            /* avoid division by 0.0 */
 
    yrange = MaxCombinedHeight();
    yrange = max(yrange, auxyrange);
    if (yrange == 0.0) yrange = 1.0;            /* avoid division by 0.0 */

    if (!bflag && !sflag) {
	bflag = strlen(jobstring) > SMALL_JOB_STRING_WIDTH; 
    }

    if (bflag) {
	titleheight = 2 * TITLE_HEIGHT;
    } else {
	titleheight = TITLE_HEIGHT;
    } 

    keyOnGraph = !multipageflag && TWENTY != 0;
    graphwidth  = titlewidth - graphx0 - (keyOnGraph ? KeyWidth() : 0);
    graphheight = borderheight - titleheight - (2 * borderspace) - graphy0;
}
Beispiel #3
0
/*
 * Scale() -- Scale the values from the samples so that they will fit on the 
 *            page.     
 */
static void Scale(void)
{
  int i;
  float sf;
  ENTRYPTR e;
  SAMPLEPTR s;
  

  #if CHAT
  printf("Scale -- ENTER\n");
  #endif

  sf = (float)(graphheight / yrange);
  for (i = 0; i < nidents; i++) {
    e = identtable[ i ];
    for (s = e->samples; s; s = s->next) {
      s->nbytes *= sf;
    }
  }

  #if DEBUG_SCALE
  printf("sf: %8.6f\n", sf);
  printf("MaxCombinedHeight: %8.4f\n", MaxCombinedHeight());
  #endif

  #if CHAT
  printf("Scale -- LEAVE\n");
  #endif

  return;
}