Get the current position of the pen.
x, y - The current new position in user (world) coordinates.
move to drawing pen to position x, y
x, y - The new position in user (world) coordinates.
draw a line from the current pen position to position x, y.
x, y - The new position in user (world) coordinates.
print text at current pen position.
label - The text to be printed.
Draw a rectangle which has position x1, y1 in one corner and position x2, y2 in the corner that is diagonally opposed to it.
x1, y1 - Position of the first corner in user (world) coordinates.x2, y2 - Position of the other corner in user (world) coordinates.
Draw a polygon from the first point in points, to the last point. The figure is not automatically closed. (at this moment no soft-clipping is supported).
numpoints - The number of x- and y-coordinate pairs in points.points - An array of x- an y-coordinate pairs in user (world) coordinates.
Draw a circle with the current x,y coordinates as central point.
radius - Radius in user (world) coordinates.
Draw a rectangle which has position x1, y1 in one corner and position x2, y2 in the corner that is diagonally opposed to it, and fill it with the current foreground color. For black and white plot- on-paper, the fill color is white if foreground color == background color, and black otherwise.
x1, y1 - Position of the first corner in user (world) coordinates.x2, y2 - Position of the other corner in user (world) coordinates.
Draw a polygon from the first point in points, to the last point, and fill it with the current foreground color. The figure is automatically closed. (at this moment no soft-clipping is supported).
numpoints - The number of x- and y-coordinate pairs in points.points - An array of x- an y-coordinate pairs in user (world) coordinates.
Draw a circle with the current x,y coordinates as central point and fill the circle with the foreground color. For black and white plot-on-paper, the fill color is white if foreground color == background color, and black otherwise.
radius - Radius in user (world) coordinates.
Clear the window or eject paper. This will delete the history (objects, viewports) of a window. The objects and viewports itself will not be deleted.
Set the current output file. G_HPGL and G_POSTSCRIPT will write output to this file.
outfile - The outputfile.
stdout
Returns the current output file.
Set viewport clipping. Everything outside the current viewport is not plotted. If the device does not support clipping, genplot will do the clipping (soft clipping) but only for g_moveto() and g_lineto() operations.
clip - The clipping state. TRUE = on , FALSE = off.
off
Returns the clipping state.
TRUE = on , FALSE = off.
Set the linewidth for all drawing operations.
width - The linewidth in pixels.
1
Get the current linewidth.
The linewidth in pixels.
Set the linestyle for all drawing operations.
pattern - G_SOLID, G_SHORT_DASHED, G_LONG_DASHED,G_DOTTED
G_SOLID
Get the current linestyle.
G_SOLID, G_SHORT_DASHED, G_LONG_DASHED or G_DOTTED
Set the number of palette entries (colors).
size - The new number of palette entries (colors).
16
G_OK on success. G_ERROR if size less than 2.
Get the number of palette entries (colors).
Set the RGB color values of a palette entrie.
entry_id - The number of the palette entry (=color) that has to change.entry - The new palette entry. The range of the RGB values is (0 ... 255).
G_OK on success. G_ERROR if entry_id is out of range.
/* typedef from genplot.h */
typedef struct {
unsigned char r;
unsigned char g;
unsigned char b;
} G_PALETTEENTRY;
G_PALETTEENTRY pal;
pal.r = 0; /* red */
pal.g = 0; /* green */
pal.b = 100; /* blue */
g_set_paletteentry(5, pal);
Get the RGB color values of a palette entrie.
entry_id - The number of the palette entry (=color).
entry - The RGB values of the palette entry.
G_OK on success. G_ERROR if entry_id is out of range.
Set the foreground color if color is available.
color - The foreground color. G_BLACK, G_BLUE, G_GREEN, G_CYAN, G_RED, G_MAGENTA, G_BROWN, G_LIGHTGRAY, G_DARKGRAY, G_LIGHTBLUE, G_LIGHTGREEN, G_LIGHTCYAN, G_LIGHTRED, G_LIGHTMAGENTA, G_YELLOW, or G_WHITE. If the palette has been re-defined, give the number of your palette-entry.
0 .. g_get_palettesize()-1
G_BLACK
Return the current foreground color.
Set the background color if color is available.
color - The background color. G_BLACK, G_BLUE, G_GREEN, G_CYAN, G_RED, G_MAGENTA, G_BROWN, G_LIGHTGRAY, G_DARKGRAY, G_LIGHTBLUE, G_LIGHTGREEN, G_LIGHTCYAN, G_LIGHTRED, G_LIGHTMAGENTA, G_YELLOW, or G_WHITE.
0 .. g_get_palettesize()-1
G_WHITE
Return the current background color.
Scale the default fontsize.(See g_set_font())
size - A scaling factor to scale the default fontsize, e.g. 0.75
1.0
Return the current charsize scale factor.
Set the current font and the font scaling policy. Font changes are not supported for G_HPGL when the G_WIN_PCL5 flag is not set. The font has a default point size of G_FONTSIZE when scaling is G_ABSOLUTE_FONTSCALING. (Point size is in pixels on the screen and in 1/72 inch units for PostScript and HPGL). Otherwise, when scaling is G_RELATIVE_FONTSCALING, the default font size is relative to the height of the window (= window height/ G_FONTSIZE_SCALING) and changes when the window is resized. The default fontsize can be modified with g_set_charsize(). An absolute font size prevents ugly bitmap scaling in X-Windows on some servers, and gives always the same character size on PostScript output. However, with a relative font size Screen and PostScript output match more closely. Note that the character width is always proportional to the character height, and never to the width of the window.
font - One of the following fonts: G_FONT_TIMES, G_FONT_TIMES_ITALIC, G_FONT_TIMES_BOLD, G_FONT_TIMES_BOLD_ITALIC, G_FONT_HELVETICA, G_FONT_HELVETICA_ITALIC, G_FONT_HELVETICA_BOLD, G_FONT_HELVETICA_BOLD_ITALIC, G_FONT_COURIER, G_FONT_COURIER_ITALIC, G_FONT_COURIER_BOLD, G_FONT_COURIER_BOLD_ITALIC, G_FONT_SYMBOL
G_FONT_HELVETICA
scaling - Set font scaling to absolute or relative:
G_ABSOLUTE_FONTSCALING, G_RELATIVE_FONTSCALING.
G_ABSOLUTE_FONTSCALING
Get the current font and the font scaling policy.
font - The current font.scaling - The current font scaling policy.
Get the current font height, relative to the window win_id.
win_id - The the window identifier ID.
The height of the current font / the height of the window win_id.
Description:
Sets the text direction. Tries to rotate the text 90 degrees anti clockwise. X-Windows can not do this, text is drawn from top to bottom instead. Patch for now: To make X-Windows do real text rotations use g_set_motif_realtextrotation(TRUE). This function uses bitmap rotation and is sloooooow.
direction - The text direction. 90 = rotate, 0 = normal (left to right)
0
The rotatetext flag. 90 = on , 0 = off.