This is hplotX11.h in view mode; [Download] [Up]
/*
* hippoplotX11.h - routines for producing pure X displays.
*
*
* Author : Tony Johnson
* Created On : 8 Feb 1992
* Last Modified By: Tony Johnson
* Last Modified On: 8 Feb 1992
* Update Count :
* Status : Release 1
*
* Copyright (C) 1991 The Board of Trustees of The Leland Stanford
* Junior University. All Rights Reserved.
*
* $Id: hplotX11.h,v 5.0 1993/08/17 21:56:15 rensing Exp $
*/
#ifndef _hippoplotX11_h_
#define _hippoplotX11_h_
#define __TYPES_LOADED 1
#include <X11/Xlib.h>
#include "hippo.h" /* For structures and enums... */
#define HIPPOPLOTX11_H_RCSID "$Id: hplotX11.h,v 5.0 1993/08/17 21:56:15 rensing Exp $"
#ifdef __cplusplus
extern "C" {
#endif
/*
* initPlot - specify the X display and drawable to be used
* for drawing. This sets global values that are used by the other routines,
* so it should be called whenever the information is changed (h_plot).
*/
void initPlot_X11(Display *disp, Screen *scrn, Drawable drawable, GC gc);
/*
* setHistoCoords - specify the inner rectangle (margin) in device coords
* (points), and the inner rectangle again in user coords. This sets global
* values that are used by the other routines, so it should be called
* whenever any rectangle specification is changed. Note that the outer
* rectangle (drawRect) is determined from the Canvas object, so we don't
* pass that.
*/
void setHistoCoords_X11(rectangle* draw, rectangle* margin, rectangle* data);
/*
* Place text at a given location in device coords. X alignment is
* specified as 'L', 'R', or 'C' (or lower case), meaning that the
* left, right, or center of the text is positioned at the xy
* location. Similarly Y alignment is given as 'B', 'C', or 'T', for
* bottom, center or top. Rotation is then performed, given in
* degrees anti-clockwise. The variable 'fontSize' is the size in
* 'points', which is currently ignored.
*/
void drawText_X11(char *message,
float x,
float y,
float fontHeight,
float angle,
char xalign,
char yalign);
/*
* plot "x10^mag" at specified location
*/
void drawMag_X11(float x, float y,
int mag,
float fontsize);
/*
* draw ticks and labels along X axis
*/
void drawXTicks_X11(float* x,
int nt,
float tickwidth,
int side);
/*
* draw ticks and labels along Y axis
*/
void drawYTicks_X11(float* y,
int nt,
float tickwidth,
int side);
/*
* draw a rectangle using the supplied device coordinates (points).
*/
void drawRect_X11(float x, float y,
float width, float height);
/*
* draw a filled rectangle using the supplied device coordinates (points).
* The fill is determined by "grey" (0-1).
*/
void drawFilledRect_X11(float x, float y,
float width, float height,
float grey);
/*
* draw a shaded rectangle in data coordinates, using a 60% grey.
*/
void shade_X11(float xlow, float xhigh,
float ylow, float yhigh );
/*
* Draw lines between coordinates
*/
void drawLine_X11(float *xy, int nxy,
linestyle_t ls);
/*
* Draw a series of points, using the symbol specified
*/
void drawPoints_X11(float xy[],
int nxy,
int symbol,
float symbolsize);
/*
* Draw horizontal error bars. We use only the y part of the
* coordinates, plus the x-low and x-high pairs.
*/
void drawXError_X11(float xy[],
float errs[],
int npts);
/*
* Draw vertical error bars. We use only the x part of the
* coordinates, plus the y-low and y-high pairs.
*/
void drawYError_X11(float xy[],
float errs[],
int npts);
/*
* greyscale/color 2D plot
*/
void drawColor2D_X11(int nXBins,
int nYBins,
float minBin,
float maxBin,
float bins[],
int fullColor);
/*
* 3D histogram (lego plot).
*/
void drawLego2D_X11(display disp);
/*
* 3D scatter plot.
*/
void drawScatter3D_X11(display disp, float *coords, int nCoords);
#ifdef __cplusplus
}
#endif
#endif /* ifndef _hippoplotX11_h_ */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.