Forge

Functions

FGAPI fg_err fg_create_plot (fg_plot *pPlot, const unsigned pNPoints, const fg_dtype pType, const fg_chart_type pChartType, const fg_plot_type pPlotType, const fg_marker_type pMarkerType)
 Create a Plot object. More...
 
FGAPI fg_err fg_destroy_plot (fg_plot pPlot)
 Destroy plot object. More...
 
FGAPI fg_err fg_set_plot_color (fg_plot pPlot, const float pRed, const float pGreen, const float pBlue, const float pAlpha)
 Set the color of line graph(plot) More...
 
FGAPI fg_err fg_set_plot_legend (fg_plot pPlot, const char *pLegend)
 Set plot legend. More...
 
FGAPI fg_err fg_set_plot_marker_size (fg_plot pPlot, const float pMarkerSize)
 Set global marker size. More...
 
FGAPI fg_err fg_get_plot_vertex_buffer (unsigned *pOut, const fg_plot pPlot)
 Get the resource identifier for vertices buffer. More...
 
FGAPI fg_err fg_get_plot_color_buffer (unsigned *pOut, const fg_plot pPlot)
 Get the resource identifier for colors buffer. More...
 
FGAPI fg_err fg_get_plot_alpha_buffer (unsigned *pOut, const fg_plot pPlot)
 Get the resource identifier for alpha values buffer. More...
 
FGAPI fg_err fg_get_plot_radii_buffer (unsigned *pOut, const fg_plot pPlot)
 Get the resource identifier for markers radii buffer. More...
 
FGAPI fg_err fg_get_plot_vertex_buffer_size (unsigned *pOut, const fg_plot pPlot)
 Get the vertices buffer size in bytes. More...
 
FGAPI fg_err fg_get_plot_color_buffer_size (unsigned *pOut, const fg_plot pPlot)
 Get the colors buffer size in bytes. More...
 
FGAPI fg_err fg_get_plot_alpha_buffer_size (unsigned *pOut, const fg_plot pPlot)
 Get the alpha values buffer size in bytes. More...
 
FGAPI fg_err fg_get_plot_radii_buffer_size (unsigned *pOut, const fg_plot pPlot)
 Get the markers buffer size in bytes. More...
 

Detailed Description

Function Documentation

§ fg_create_plot()

FGAPI fg_err fg_create_plot ( fg_plot pPlot,
const unsigned  pNPoints,
const fg_dtype  pType,
const fg_chart_type  pChartType,
const fg_plot_type  pPlotType,
const fg_marker_type  pMarkerType 
)

Create a Plot object.

Parameters
[out]pPlotwill be set to plot handle upon creating the plot object
[in]pNPointsis number of data points to display
[in]pTypetakes one of the values of fg_dtype that indicates the integral data type of plot data
[in]pChartTypedictates the dimensionality of the chart
[in]pPlotTypedictates the type of plot/graph, it can take one of the values of fg_plot_type
[in]pMarkerTypeindicates which symbol is rendered as marker. It can take one of the values of fg_marker_type.
Returns
fg_err error code

§ fg_destroy_plot()

FGAPI fg_err fg_destroy_plot ( fg_plot  pPlot)

Destroy plot object.

Parameters
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_alpha_buffer()

FGAPI fg_err fg_get_plot_alpha_buffer ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the resource identifier for alpha values buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_alpha_buffer_size()

FGAPI fg_err fg_get_plot_alpha_buffer_size ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the alpha values buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_color_buffer()

FGAPI fg_err fg_get_plot_color_buffer ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the resource identifier for colors buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_color_buffer_size()

FGAPI fg_err fg_get_plot_color_buffer_size ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the colors buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_radii_buffer()

FGAPI fg_err fg_get_plot_radii_buffer ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the resource identifier for markers radii buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_radii_buffer_size()

FGAPI fg_err fg_get_plot_radii_buffer_size ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the markers buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_vertex_buffer()

FGAPI fg_err fg_get_plot_vertex_buffer ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the resource identifier for vertices buffer.

Parameters
[out]pOutwill have the buffer identifier after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_get_plot_vertex_buffer_size()

FGAPI fg_err fg_get_plot_vertex_buffer_size ( unsigned *  pOut,
const fg_plot  pPlot 
)

Get the vertices buffer size in bytes.

Parameters
[out]pOutwill have the buffer size in bytes after this function is called
[in]pPlotis the plot handle
Returns
fg_err error code

§ fg_set_plot_color()

FGAPI fg_err fg_set_plot_color ( fg_plot  pPlot,
const float  pRed,
const float  pGreen,
const float  pBlue,
const float  pAlpha 
)

Set the color of line graph(plot)

Parameters
[in]pPlotis the plot handle
[in]pRedis Red component in range [0, 1]
[in]pGreenis Green component in range [0, 1]
[in]pBlueis Blue component in range [0, 1]
[in]pAlphais Blue component in range [0, 1]
Returns
fg_err error code

§ fg_set_plot_legend()

FGAPI fg_err fg_set_plot_legend ( fg_plot  pPlot,
const char *  pLegend 
)

Set plot legend.

Parameters
[in]pPlotis the plot handle
[in]pLegend
Returns
fg_err error code

§ fg_set_plot_marker_size()

FGAPI fg_err fg_set_plot_marker_size ( fg_plot  pPlot,
const float  pMarkerSize 
)

Set global marker size.

This size will be used for rendering markers if no per vertex marker sizes are provided. This value defaults to 10

Parameters
[in]pPlotis the plot handle
[in]pMarkerSizeis the target marker size for scatter plots or line plots with markers
Returns
fg_err error code