Forge
Hist_functions

Functions

FGAPI fg_err fg_create_histogram (fg_histogram *pHistogram, const unsigned pNBins, const fg_dtype pDataType)
 Creates a Histogram object.
 
FGAPI fg_err fg_retain_histogram (fg_histogram *pOut, fg_histogram pIn)
 Increase reference count of the resource.
 
FGAPI fg_err fg_release_histogram (fg_histogram pHistogram)
 Destroy Histogram object.
 
FGAPI fg_err fg_set_histogram_color (fg_histogram pHistogram, const float pRed, const float pGreen, const float pBlue, const float pAlpha)
 Set the color of bar in the bar graph(histogram)
 
FGAPI fg_err fg_set_histogram_legend (fg_histogram pHistogram, const char *pLegend)
 Set legend for histogram plot.
 
FGAPI fg_err fg_get_histogram_vertex_buffer (unsigned *pOut, const fg_histogram pHistogram)
 Get the resource identifier for vertices buffer.
 
FGAPI fg_err fg_get_histogram_color_buffer (unsigned *pOut, const fg_histogram pHistogram)
 Get the resource identifier for colors buffer.
 
FGAPI fg_err fg_get_histogram_alpha_buffer (unsigned *pOut, const fg_histogram pHistogram)
 Get the resource identifier for alpha values buffer.
 
FGAPI fg_err fg_get_histogram_vertex_buffer_size (unsigned *pOut, const fg_histogram pHistogram)
 Get the vertices buffer size in bytes.
 
FGAPI fg_err fg_get_histogram_color_buffer_size (unsigned *pOut, const fg_histogram pHistogram)
 Get the colors buffer size in bytes.
 
FGAPI fg_err fg_get_histogram_alpha_buffer_size (unsigned *pOut, const fg_histogram pHistogram)
 Get the alpha values buffer size in bytes.
 

Detailed Description

Function Documentation

◆ fg_create_histogram()

FGAPI fg_err fg_create_histogram ( fg_histogram pHistogram,
const unsigned  pNBins,
const fg_dtype  pDataType 
)

Creates a Histogram object.

Parameters
[out]pHistogramwill point to the histogram object created after this function call
[in]pNBinsis number of bins the data is sorted out
[in]pDataTypetakes one of the values of fg_dtype that indicates the integral data type of histogram data
Returns
fg_err error code

◆ fg_get_histogram_alpha_buffer()

FGAPI fg_err fg_get_histogram_alpha_buffer ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the resource identifier for alpha values buffer.

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

◆ fg_get_histogram_alpha_buffer_size()

FGAPI fg_err fg_get_histogram_alpha_buffer_size ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the alpha values buffer size in bytes.

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

◆ fg_get_histogram_color_buffer()

FGAPI fg_err fg_get_histogram_color_buffer ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the resource identifier for colors buffer.

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

◆ fg_get_histogram_color_buffer_size()

FGAPI fg_err fg_get_histogram_color_buffer_size ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the colors buffer size in bytes.

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

◆ fg_get_histogram_vertex_buffer()

FGAPI fg_err fg_get_histogram_vertex_buffer ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the resource identifier for vertices buffer.

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

◆ fg_get_histogram_vertex_buffer_size()

FGAPI fg_err fg_get_histogram_vertex_buffer_size ( unsigned *  pOut,
const fg_histogram  pHistogram 
)

Get the vertices buffer size in bytes.

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

◆ fg_release_histogram()

FGAPI fg_err fg_release_histogram ( fg_histogram  pHistogram)

Destroy Histogram object.

Parameters
[in]pHistogramis the histogram handle
Returns
fg_err error code

◆ fg_retain_histogram()

FGAPI fg_err fg_retain_histogram ( fg_histogram pOut,
fg_histogram  pIn 
)

Increase reference count of the resource.

Parameters
[out]pOutis the new handle to existing resource
[in]pInis the existing resource handle
Returns
fg_err error code

◆ fg_set_histogram_color()

FGAPI fg_err fg_set_histogram_color ( fg_histogram  pHistogram,
const float  pRed,
const float  pGreen,
const float  pBlue,
const float  pAlpha 
)

Set the color of bar in the bar graph(histogram)

This is global alpha value for the histogram rendering that takes effect if individual bar alphas are not set by calling the following member functions

  • Histogram::alphas()
  • Histogram::alphasSize()
Parameters
[in]pHistogramis the histogram 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 Alpha component in range [0, 1]
Returns
fg_err error code

◆ fg_set_histogram_legend()

FGAPI fg_err fg_set_histogram_legend ( fg_histogram  pHistogram,
const char *  pLegend 
)

Set legend for histogram plot.

Parameters
[in]pHistogramis the histogram handle
[in]pLegend
Returns
fg_err error code