#ifndef lint static char SccsId[] = "%W% %G%"; #endif /* Module: grphline.c (Color Graph Line) * Purpose: Assemble lines and hash marks for the color graph * Subroutine: init_cgraph_lines() returns: void * Subroutine: set_cgraph_line() returns: void * Subroutine: init_cgraph_bars() returns: void * Subroutine: set_cgraph_bar() returns: void * Subroutine: init_cgraph_hash() returns: void * Subroutine: set_cgraph_hash() returns: void * Copyright: 1989 Smithsonian Astrophysical Observatory * You may do anything you like with this file except remove * this copyright. The Smithsonian Astrophysical Observatory * makes no representations about the suitability of this * software for any purpose. It is provided "as is" without * express or implied warranty. * Modified: {0} Michael VanHilst initial version 11 June 1989 * {n} -- -- */ #include /* X window stuff */ #include /* X window manager stuff */ #include "hfiles/color.h" /* color structs */ #include "hfiles/cgraph.h" /* color graph structs */ extern struct cgraphRec cgraph; /* * Subroutine: init_cgraph_lines * Purpose: Set the fixed color_linegraph coordinates (aligning segments * with the corresponding colorbar stripe) */ void init_cgraph_lines ( rline, gline, bline ) XPoint rline[]; XPoint gline[]; XPoint bline[]; { double inc; /* l: ideal increment from one point to the next */ register int i; if( cgraph.vertical ) { double Y; /* vertical */ inc = cgraph.graph.Yinc; Y = (double)cgraph.graph.yzero + (inc / 2.0); for( i=0; i=0; i--, j++ ) line[i].x = xzero + (int)(cellmap[j] * Xwidth); } else { double Yheight = cgraph.graph.Yheight; int ymax = cgraph.graph.ymax; /* horizontal */ for( i=0; i=0; i--, j-=2 ) { x = xzero + (int)(cellmap[i] * Xwidth); line[j].x = x; line[j+1].x = x; } } else { double Yheight = cgraph.graph.Yheight; int ymax = cgraph.graph.ymax; register int y; /* horizontal */ for( i=0, j=0; icell_level; intensity = table->intensity; vertex_cnt = table->vertex_cnt; for( i=0; i