IupgraphGL
 All Files Functions Enumerations Enumerator
Enumerations | Functions
iupgraph_gl.h File Reference
#include <iup.h>
#include <cd.h>
#include <im.h>
#include <im_image.h>

Go to the source code of this file.

Enumerations

enum  IupGraphImageFmt {
  IUPG_BMP = 0, IUPG_PCX = 1, IUPG_GIF = 2, IUPG_TIFF = 3,
  IUPG_RAS = 4, IUPG_SGI = 5, IUPG_JPEG = 6, IUPG_LED = 7,
  IUPG_TGA = 8, IUPG_RAW = 9, IUPG_PNM = 10, IUPG_ICO = 11,
  IUPG_PNG = 12, IUPG_SVG = -1, IUPG_PDF = -2, IUPG_PS = -3,
  IUPG_EPS = -4
}
 
enum  IupGraphAlignment {
  IUPG_CENTER = CD_CENTER, IUPG_NORTH = CD_NORTH, IUPG_SOUTH = CD_SOUTH, IUPG_WEST = CD_WEST,
  IUPG_EAST = CD_EAST, IUPG_NWEST = CD_NORTH_WEST, IUPG_NEAST = CD_NORTH_EAST, IUPG_SWEST = CD_SOUTH_WEST,
  IUPG_SEAST = CD_SOUTH_EAST
}
 
enum  IupGraphChartType {
  IUPG_CHART_CART, IUPG_CHART_POLAR, IUPG_CHART_BAR, IUPG_CHART_STEP,
  IUPG_CHART_PIE
}
 
enum  ChartOrientation { IUPG_VERTICAL, IUPG_HORIZONTAL }
 
enum  ChartDataInput { IUPG_USEX, IUPG_USEY, IUPG_USEP }
 
enum  ColorScheme { IUPG_SINGLE, IUPG_POSNEG, IUPG_MULTIPLE }
 
enum  AxisLine {
  IUPGRAPH_AXIS_X, IUPGRAPH_AXIS_Y, IUPGRAPH_GRID_X, IUPGRAPH_GRID_Y,
  IUPGRAPH_GRID_AUX_X, IUPGRAPH_GRID_AUX_Y
}
 

Functions

void * IupGraphCreate (Ihandle *canvas, double xmin, double xmax, double ymin, double ymax)
 
void * IupGraphCreatePassive (int w, int h, double xmin, double xmax, double ymin, double ymax)
 
void IupGraphDestroy (void *graph)
 
void IupGraphRedraw (void *graph)
 
void IupGraphDump (void *graph, const char *fname, IupGraphImageFmt image_format)
 
void IupGraphFit (void *graph)
 
void IupGraphFitLimits (void *graph)
 
void * IupGraphChartCreate (int npoints, double *x, double *y, const char *name, IupGraphChartType type)
 
void * IupGraphChartCopy (void *chart)
 
void * IupGraphChartCreateCb (int npoints, int(*cb)(void *chart, int i, double *x, double *y), const char *name, IupGraphChartType type)
 
int IupGraphChartInsert (void *graph, void *chart)
 
void IupGraphChartRemove (void *graph, void *chart)
 
void IupGraphChartDestroy (void *chart)
 
void IupGraphChartDestroyAll (void *graph)
 
void IupGraphChartRefreshData (void *graph, void *chart, double *x, double *y, int npoints)
 
void IupGraphChartSetShow (void *chart, int show)
 
void IupGraphChartSetLine (void *chart, int show, float width, int style, long int color)
 
void IupGraphChartSetMark (void *chart, int show, int size, int type, long int color)
 
void IupGraphChartSetPosition (void *chart, double x, double y)
 
void * IupGraphChartGetLine (void *chart)
 
void IupGraphChartSetClient (void *chart, void *client)
 
void * IupGraphChartGetClient (void *chart)
 
void * IupGraphChartGetGraph (void *chart)
 
void IupGraphChartSetLabel_i (void *chart, int i, char *label_i)
 
void * IupGraphChartGetLabel_i (void *chart, int i)
 
void IupGraphChartSetColor_i (void *chart, int i, long int color_i)
 
void IupGraphChartPieSetPosition (void *chart, double x, double y)
 
void IupGraphChartPieSetRadius (void *chart, double radius)
 
void * IupGraphChartGetLabelConnectorLine (void *chart)
 
void * IupGraphChartGetLegend (void *chart)
 
void IupGraphAxisSetLimits (void *g, float xmin, float xmax, float ymin, float ymax, float ox, float oy, int nx, int ny)
 
void IupGraphAxisGetLimits (void *g, float *xmin, float *xmax, float *ymin, float *ymax, float *ox, float *oy, int *nx, int *ny)
 
void * IupGraphAxisGetTitleX (void *g)
 
void * IupGraphAxisGetTitleY (void *g)
 
void IupGraphAxisSetDecimalPlacesX (void *g, int d)
 
void IupGraphAxisSetDecimalPlacesY (void *g, int d)
 
void * IupGraphAxisGetLine (void *g, AxisLine line)
 
void * IupGraphScaleGetX (void *g)
 
void * IupGraphScaleGetY (void *g)
 
void IupGraphScaleSetShow (void *scale, int show)
 
int IupGraphScaleGetShow (void *scale)
 
void IupGraphScaleSetPosition (void *scale, float x, float y)
 
void IupGraphScaleGetPosition (void *scale, float *x, float *y)
 
void IupGraphWindowAxesShow (void *g, int show)
 
void IupGraphLineSetShow (void *line, int show)
 
void IupGraphLineSetWidth (void *line, float width)
 
void IupGraphLineSetStyle (void *line, int style)
 
void IupGraphLineSetColor (void *line, long int color)
 
int IupGraphLineGetShow (void *line)
 
float IupGraphLineGetWidth (void *line)
 
int IupGraphLineGetStyle (void *line)
 
long int IupGraphLineGetColor (void *line)
 
void * IupGraphTextCreate (char *text_string)
 
void IupGraphTextInsert (void *graph, void *text)
 
void IupGraphTextDestroy (void *graph, void *text)
 
void * IupGraphGetTitle (void *graph)
 
void * IupGraphChartGetTitle (void *chart)
 
void IupGraphTextSetShow (void *text, int a)
 
void IupGraphTextSetValue (void *text, char *a)
 
void IupGraphTextSetFont (void *text, char *a)
 
void IupGraphTextSetOpaque (void *text, int a)
 
void IupGraphTextSetSize (void *text, int a)
 
void IupGraphTextSetColor (void *text, long int a)
 
void IupGraphTextSetDrawbox (void *text, int a)
 
void IupGraphTextSetBoxbgcolor (void *text, long int a)
 
void IupGraphTextSetBoxlinecolor (void *text, long int a)
 
void IupGraphTextSetAlignment (void *text, int a)
 
void IupGraphTextSetPosition (void *text, float x, float y)
 
void IupGraphTextSetNormalizedPosition (void *graph, void *text, float x, float y)
 
void IupGraphTextSetAngle (void *text, float angle)
 
int IupGraphTextIsShown (void *text)
 
const char * IupGraphTextGetValue (void *text)
 
const char * IupGraphTextGetFont (void *text)
 
int IupGraphTextGetOpaque (void *text)
 
int IupGraphTextGetSize (void *text)
 
long int IupGraphTextGetTextcolor (void *text)
 
int IupGraphTextGetDrawbox (void *text)
 
long int IupGraphTextGetBoxbgcolor (void *text)
 
long int IupGraphTextGetBoxlinecolor (void *text)
 
void IupGraphTextGetPosition (void *text, float *x, float *y)
 
float IupGraphTextGetAngle (void *text)
 
void IupGraphLegendShow (void *graph, int show)
 
void IupGraphLegendSetUseChartColor (void *graph, int use)
 
int IupGraphLegendGetUseChartColor (void *graph)
 
void IupGraphLegendSetPosition (void *graph, float x, float y)
 
void IupGraphLegendSetAlignment (void *graph, int align)
 
void IupGraphLegendSetOpaque (void *graph, int a)
 
void IupGraphLegendSetBoxbgcolor (void *graph, long int a)
 
int IupGraphLegendGetOpaque (void *graph)
 
void IupGraphPickSetTolerance (void *graph, int tol)
 
void IupGraphSetZoomStep (void *graph, float step)
 
void IupGraphSetZoomFactor (void *graph, float factor)
 
void IupGraphGetZoomBox (void *graph, float *xmin, float *xmax, float *ymin, float *ymax)
 
void IupGraphSetZoomBox (void *graph, float xmin, float xmax, float ymin, float ymax)
 
void IupGraphSetClipCharts (void *graph, int clip)
 
int IupGraphGetClipCharts (void *graph)
 
void IupGraphBgSetColor (void *graph, float r, float g, float b)
 
void IupGraphBgGetColor (void *graph, float *r, float *g, float *b)
 
void IupGraphSetMouseMvCallback (void *g, void(*fcn)(double x, double y, char *r, void **curve_vector, double *picked_x, double *picked_y, int nsel_curves))
 
void IupGraphSetMouseBtCallback (void *g, void(*fcn)(int bt, int status, double x, double y, void **curve_vector, double *picked_x, double *picked_y, int nsel_curves))
 
void IupGraphChartSetFocusable (void *chart, int b)
 
void IupGraphChartSetPickable (void *chart, int b)
 
void IupGraphChartShowLabelX (void *chart, int b)
 
void IupGraphChartShowLabelY (void *chart, int b)
 
void IupGraphChartAllowUser2Destroy (void *chart, int b)
 
void IupGraphChartGetLimits (void *chart, double *xmin, double *xmax, double *ymin, double *ymax)
 
void * IupGraphCAreaCreate (void *chart1, void *chart2, double x0, double y0, double x1, double y1)
 
void IupGraphCAreaInsert (void *graph, void *curvearea)
 
void IupGraphCAreaSetUpper (void *carea, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
void IupGraphCAreaSetLower (void *carea, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
void IupGraphCAreaSetLimits (void *carea, double xmin, double xmax, double ymin, double ymax)
 
int IupGraphCAreaDestroy (void *graph, void *carea)
 
void IupGraphCAreaDestroyAll (void *graph)
 
void IupGraphChartShowMark (void *chart, int show)
 
void IupGraphChartSetMarkColor (void *chart, long int color)
 
void IupGraphChartSetMarkSize (void *chart, int size)
 
void IupGraphChartSetMarkType (void *chart, int type)
 
int IupGraphChartIsMarkShown (void *chart)
 
long IupGraphChartGetMarkColor (void *chart)
 
int IupGraphChartGetMarkSize (void *chart)
 
int IupGraphChartGetMarkType (void *chart)
 

Detailed Description

Iupgraph C style API This file conatins a set of C style functions to enable the client to create and handle IupGraph objects.

Enumeration Type Documentation

Enumerators

Possible types of Chart.

Enumerator
IUPG_CHART_POLAR 

Chart of points with cartesian coordintes.

IUPG_CHART_BAR 

Chart of points with polar coordintates.

IUPG_CHART_STEP 

Bar Chart

IUPG_CHART_PIE 

Step Chart Pie Chart

Enumerator
IUPG_BMP 

BMP - Windows Device Independent Bitmap

IUPG_PCX 

PCX - ZSoft Picture

IUPG_GIF 

GIF - Graphics Interchange Format

IUPG_TIFF 

TIFF - Tagged Image File Format

IUPG_RAS 

RAS - Sun Raster File

IUPG_SGI 

SGI - Silicon Graphics Image File Format

IUPG_JPEG 

JPEG - JPEG File Interchange Format

IUPG_LED 

LED - IUP image in LED

IUPG_TGA 

TGA - Truevision Targa

IUPG_RAW 

RAW - RAW File

IUPG_PNM 

PNM - Netpbm Portable Image Map

IUPG_ICO 

ICO - Windows Icon

IUPG_PNG 

PNG - Portable Network Graphic Format

IUPG_SVG 

SVG - Scalable Vector Graphics (vector)

IUPG_PDF 

PDF - Portable Document Format (vector)

IUPG_PS 

PS - PostScript (vector)

IUPG_EPS 

EPS - Encapsulated PostScript (vector)

Function Documentation

void IupGraphBgSetColor ( void *  graph,
float  r,
float  g,
float  b 
)

Here, the color components should range from 0.0f to 1.0f

void* IupGraphCAreaCreate ( void *  chart1,
void *  chart2,
double  x0,
double  y0,
double  x1,
double  y1 
)

Creates a CurveArea, which is an area plotted between two charts or between a chart and a straight segment of line. For instance, this line could be the x axis. The line is defined by two points: P0 and P1. If chart2 is NULL, the area will be considered between chart1 and the line from P0 to P1.

Parameters
chart1Pointer to the first Chart.
chart2Pointer to the second Chart. It can be NULL; in this case, x0, y0, x1 and y1 will be used.
x0x component of the point P0. It is only used if chart2 is NULL.
y0y component of the point P0. It is only used if chart2 is NULL.
x1x component of the point P1. It is only used if chart2 is NULL.
y1y component of the point P1. It is only used if chart2 is NULL.
Returns
A pointer to the created CurveArea or NULL in case of failure.
See Also
IupGraphCAreaInsert
Attention
It only makes sense if the charts are of POINT type.
int IupGraphCAreaDestroy ( void *  graph,
void *  carea 
)

Destroys the given CurveArea

Returns
1 in case of success and 0 if failed.
void IupGraphCAreaDestroyAll ( void *  graph)

Destroys all CurveAreas, if any, of IupGraph

void IupGraphCAreaInsert ( void *  graph,
void *  curvearea 
)

Inserts a CurveArea into IupGraph.

Parameters
graphPointer to the IupGraph where curvearea will be inserted. If it is NULL, nothing happens.
curveareaPointer to the CurveArea. If is is NULL, nothing happens.
See Also
IupGraphCreateCArea
void IupGraphCAreaSetLimits ( void *  carea,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)
Sets the limits of a CurveArea.

Defines an area for clipping. CurveAreas are only drawn inside the box (xmin,xmax,ymin,ymax).

void IupGraphCAreaSetLower ( void *  carea,
unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
Sets the appearance of the lower area in a CurveArea.

The lower area is the portion of area that lies bellow chart2 or line (P0,P1).

Parameters
careaPointer to the CurveArea. If is is NULL, nothing happens.
rRed component of the background color.
gGreen component of the background color.
bBlue component of the background color.
aAlpha component of the background color.
See Also
IupGraphCAreaCreate
void IupGraphCAreaSetUpper ( void *  carea,
unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
Sets the appearance of the upper area in a CurveArea.

The upper area is the portion of area that lies above chart2 or line (P0,P1).

Parameters
careaPointer to the CurveArea. If is is NULL, nothing happens.
rRed component of the background color.
gGreen component of the background color.
bBlue component of the background color.
aAlpha component of the background color.
See Also
IupGraphCAreaCreate
void* IupGraphChartCopy ( void *  chart)

Creates a completely independent copy of the given chart. The only difference is that the created Chart is not inserted in any IupGraph.

Parameters
chartChart to be copied.
Returns
A pointer to the created chart or NULL if an error occurs.
Attention
The coordinates (x,y) remain the same. So, once they are held by the client, they must NOT be deleted before both charts (chart and its copy) are deleted/destroyed.
void* IupGraphChartCreate ( int  npoints,
double *  x,
double *  y,
const char *  name,
IupGraphChartType  type 
)

Creates a chart entity that is not yet inserted in Iupgraph. Thus, it can be inserted in any Iupgraph. If you want to insert it in more than one Iupgraph, I recommend to insert a copy of this chart. Call IupGraphCopyChart(chart_to_be_copied).

By default, the created chart is a line chart.

Parameters
npointsNumber of points. Size of the arrays x and y.
xArray containing the x coordinates. Should not be a NULL pointer.
yArray containing the y coordinates. Should not be a NULL pointer.
nameTitle name for the Chart. Can be NULL, if no name is desired.
void* IupGraphChartCreateCb ( int  npoints,
int(*)(void *chart, int i, double *x, double *y)  cb,
const char *  name,
IupGraphChartType  type 
)

Creates a chart with a callback (Cb) to retrieve the values of x and y. Instead of passing x and y as arguments, a pointer to the callback is passed. It is useful when the client does not have the arrays x and y stored in memory. This callback will be called not only to draw the chart, but also to compute its bounding box etc. It works in the very same way as a chart created by IupGraphChartCreate. The callback should set the values of x and y, given the index i. It must work for i in [0,npoints-1]. If it returns 0, Iupgraph will understand that i is out of bounds.

See Also
IupGraphChartCreate
void IupGraphChartDestroy ( void *  chart)

Destroys the given chart. If the given Chart belongs to a Iupgraph, it is first removed.

Parameters
chartChart to be destroyed.
void IupGraphChartDestroyAll ( void *  graph)

Removes and destroys all charts from IupGraph

void* IupGraphChartGetClient ( void *  chart)

Retrieves the client pointer previously set.

void* IupGraphChartGetGraph ( void *  chart)

Retrieves the pointer of the Graph that the chart belongs to. If NULL, the chart was not inserted, yet. Useful in callback mode.

void* IupGraphChartGetLabel_i ( void *  chart,
int  i 
)

Returns a pointer to the text object of label i

void* IupGraphChartGetLabelConnectorLine ( void *  chart)

Returns a LineMask object with the attributes of the line connecting the slices to its labels

void* IupGraphChartGetTitle ( void *  chart)

Gets the title of a Chart.

Returns
A pointer to a Text object that is the title itself. This pointer can be used in any IupGraphText... function.
int IupGraphChartInsert ( void *  graph,
void *  chart 
)

Inserts chart into IupGraph. If the chart is already inserted in an Iupgraph, nothing happens. If you want to insert the chart in more than one Iupgraph, you can either remove it first from a Iupgraph or create a fresh copy of the chart.

Parameters
graphPointer to IupGraph.
chartChart to be inserted.
Returns
1 in case of success and 0 otherwise.
See Also
IupGraphChartRemove IupGraphChartCopy
void IupGraphChartPieSetPosition ( void *  chart,
double  x,
double  y 
)

Sets the pie's center position.

void IupGraphChartPieSetRadius ( void *  chart,
double  radius 
)

Sets the pie's outer radius

void IupGraphChartRefreshData ( void *  graph,
void *  chart,
double *  x,
double *  y,
int  npoints 
)

Refreshes the data used by the Chart. Both x and y can be NULL. So, the client can change only the number of points (npoints) in this case. It is more efficient than Removing a Chart and Inserting it back, when the desire is only to change the number of points or to change the data x and/or y.

void IupGraphChartRemove ( void *  graph,
void *  chart 
)

Removes a Chart from IupGraph. If chart does not belong to graph, nothing happens.

Parameters
graphPointer to IupGraph.
chartpointer to the Chart to be removed.
Attention
The chart is not destroyed. Thus it can be reinserted into any instance of IupGraph. In order to destroy chart properly, call IupGraphChartDestroy
void IupGraphChartSetClient ( void *  chart,
void *  client 
)

Sets a client pointer to the chart.

void IupGraphChartSetColor_i ( void *  chart,
int  i,
long int  color_i 
)

This only works for pie charts so far. Sets the color of slice i, where i in[0,npoints].

void IupGraphChartSetLabel_i ( void *  chart,
int  i,
char *  label_i 
)

This only works for pie charts so far. Sets the label of index i, where i in[0,npoints].

void IupGraphChartSetPosition ( void *  chart,
double  x,
double  y 
)

Sets the center of the a polar chart or a pie chart.

Parameters
chartPointer to the polar chart. If it is NULL or the chart is not polar or pie, nothing happens.
void IupGraphChartSetShow ( void *  chart,
int  show 
)

Sets whether the chart will be shown or not

Parameters
chartPointer to the chart object. If it is NULL, nothing happens.
showIf 1, the chart will be shown. If 0, the chart will be hidden.
void * IupGraphCreate ( Ihandle *  canvas,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Creates a IupGraph associated to the given IupCanvas.

Parameters
canvasa pointer to a IupGLCanvas where the drawings will take place. This canvas MUST already be mapped!
xminleft margin proportional to the canvas size. Common values range from 0.0 to 0.2.
xmaxright margin proportional to the canvas size. Common values range from 0.9 to 1.0.
yminlower margin.
ymaxupper margin.
Returns
a void pointer to the created IupGraph or NULL, if failed.

These margins are values that define a box inside the canvas. The values must be in [0.0,1.0]. This box is the space of the canvas that the axes will occupy. Usually y scale is on the left hand side, so xmin should be long enough to make room for it. Analogously, ymin should make enough room for x scale (usually bellow the axes).

The canvas should already be mapped, i.e. the dialog that contains it should be mapped prior to calling IupGraphCreate. This is because IupGraph needs to know the canvas' dimensions and it only makes sense after mapping.

See Also
IupGraphDestroy IupGraphCreatePassive
IupGraphDestroy ( void *  graph)

Destroys IupGraph and everything inserted in it.

Parameters
graphpointer to the IupGraph. The same pointer returned by IupGraphCreate.

If the parameter graph is NULL, nothing happens.

See Also
IupGraphCreate
void IupGraphFit ( void *  graph)

Fits axes to the box passed as argument in function IupGraphCreate.

Parameters
graphpointer to the IupGraph. The same pointer returned by IupGraphCreate.

This action fits the view to the default view. It is the same as to call IupGraphSetZoomFactor passing 1.0 as argument.

See Also
IupGraphCreate IupGraphSetZoomFactor
void IupGraphFitLimits ( void *  graph)

Fits axes limits to the extents of the charts.

Parameters
graphpointer to the IupGraph. The same pointer returned by IupGraphCreate. This function is useful when you remove charts, or when you insert it. If the current limit is too large, is gets shrunk.

This action does not fit the view. To fit the view, call IupGraphFit.

See Also
IupGraphCreate IupGraphFit
int IupGraphGetClipCharts ( void *  graph)

Gets the value of the clipping flag.

void* IupGraphGetTitle ( void *  graph)

Gets the main title of IupGraph.

Returns
A pointer to a Text object that is the title itself. This pointer can be used in any IupGraphText... function.
void IupGraphGetZoomBox ( void *  graph,
float *  xmin,
float *  xmax,
float *  ymin,
float *  ymax 
)

Gets the current zoom box. It analogous to the parameters of a camera in a 3D scene. It is useful to allow insertion and removal of charts while keeping the current view.

void IupGraphLegendSetPosition ( void *  graph,
float  x,
float  y 
)

The values x and y are in [0.0,1.0]. They are a percentage of the whole window. I.e (0,0) is the bottom left corner and (1,1) is the top right corner.

void IupGraphPickSetTolerance ( void *  graph,
int  tol 
)

Tolerance in pixels. Defines a square with width=height=tol

void IupGraphRedraw ( void *  graph)

Redraws IupGraph in the active OpenGL context.

Parameters
graphpointer to the IupGraph. The same pointer returned by IupGraphCreate.
Attention
Notice that this function clears the canvas with the background color.
void IupGraphSetClipCharts ( void *  graph,
int  clip 
)

Sets a flag to clip or not the Charts drawings into the axes limits. By default it doesn't clip.

void IupGraphSetZoomBox ( void *  graph,
float  xmin,
float  xmax,
float  ymin,
float  ymax 
)

Sets the current zoom box. It analogous to the parameters of a camera in a 3D scene. It is useful to allow insertion and removal of charts while keeping the current view.

void IupGraphSetZoomFactor ( void *  graph,
float  factor 
)

Sets zoom factor dafault: 1.00 (100%)

void IupGraphSetZoomStep ( void *  graph,
float  step 
)

Zoom step used when scrolling the mouse or Zoomming In/Out default: 0.01 (1%)

void* IupGraphTextCreate ( char *  text_string)

Creates a new Text object that can be inserted in IupGraph

void IupGraphTextDestroy ( void *  graph,
void *  text 
)

Destroys a text previously inserted by IupGraphTextInsert

void IupGraphTextInsert ( void *  graph,
void *  text 
)

Inserts previously created text into Iupgraph

void IupGraphTextSetAlignment ( void *  text,
int  a 
)

Sets the point of the text's bounding box that will be used to align the text. This point will be placed at the position attribute of the text.

Parameters
textA pointer to the text object. If is is NULL, nothing happens.
aThe value of the alignment. It can be either IUPG_CENTER, IUPG_NORTH, IUPG_SOUTH, IUPG_WEST, IUPG_EAST, IUPG_NWEST, IUPG_NEAST, IUPG_SWEST or IUPG_SEAST.
See Also
IupGraphAlignment IupGraphTextSetPosition IupGraphTextSetNormalizedPosition
void IupGraphTextSetAngle ( void *  text,
float  angle 
)

Sets the orientation angle for a text in degrees. Angle is measured counter-clockwisely from x axis.

void IupGraphTextSetNormalizedPosition ( void *  graph,
void *  text,
float  x,
float  y 
)

Sets the position of a text object normalized to the window limits. The values of x or y should lie in the interval [0.0,1.0] in order to the text to be displayed in the default view (the fit view). These values are closely related to the values passed to the function IupGraphCreate.

Parameters
graphA pointer to the IupGraph that holds the text object. If it is NULL, nothing happens.
textA pointer to the text object to be positioned. If it is NULL, nothing happens.
xX normalized coordinate according to the window limits.
yY normalized coordinate according to the window limits.
void IupGraphTextSetPosition ( void *  text,
float  x,
float  y 
)

Sets the position of a text object in axes coordinates

Parameters
textA pointer to the text object. If is is NULL, nothing happens.
xX coordinate measured in the abscissae of the axes.
yY coordinate measured in the ordinate of the axes.