Poc Types

Poc Types — Boxed types and enums used by PocPlot.

Functions

#define poc_point_array_index()
#define poc_point_array_len()
#define poc_point_array_append_val()
PocPointArray * poc_point_array_new ()
PocPointArray * poc_point_array_sized_new ()
PocPointArray * poc_point_array_set_size ()
PocPointArray * poc_point_array_append_vals ()
PocPointArray * poc_point_array_ref ()
void poc_point_array_unref ()
#define poc_double_array_index()
#define poc_double_array_len()
#define poc_double_array_append_vals()
#define poc_double_array_append_val()
PocDoubleArray * poc_double_array_new ()
PocDoubleArray * poc_double_array_sized_new ()
PocDoubleArray * poc_double_array_set_size ()
PocDoubleArray * poc_double_array_ref ()
void poc_double_array_unref ()
const gchar * poc_enum_to_string ()
gint poc_enum_from_string ()
const double * poc_line_style_get_dashes ()

Types and Values

Object Hierarchy

    GBoxed
    ├── PocDoubleArray
    ├── PocPoint
    ╰── PocPointArray
    GEnum
    ├── PocAxisMode
    ╰── PocLineStyle

Includes

#include <poc.h>

Description

Boxed types and enums used by PocPlot.

Functions

poc_point_array_index()

#define poc_point_array_index(a,i) ((a)->data[(i)])

poc_point_array_len()

#define poc_point_array_len(a)		((a)->len)

poc_point_array_append_val()

#define poc_point_array_append_val(a,v) poc_point_array_append_vals (a, &(v), 1)

poc_point_array_new ()

PocPointArray *
poc_point_array_new (void);

A wrapper for GArray to create an array of PocPointArray values.

Returns

a PocPointArray.

[transfer full]


poc_point_array_sized_new ()

PocPointArray *
poc_point_array_sized_new (guint reserved_size);

A wrapper for GArray to create an array of PocPointArray values with reserved_size elements preallocated. This avoids frequent reallocation, if you are going to add many elements to the array. Note however that the size of the array is still zero.

Parameters

reserved_size

number of elements preallocated

 

Returns

a PocPointArray.

[transfer full]


poc_point_array_set_size ()

PocPointArray *
poc_point_array_set_size (PocPointArray *array,
                          guint size);

Sets the size of the array, expanding it if necessary The new elements are set to 0.

Parameters

array

a PocPointArray

 

size

the new size of the array

 

Returns

the PocPointArray.

[transfer none]


poc_point_array_append_vals ()

PocPointArray *
poc_point_array_append_vals (PocPointArray *dst,
                             const PocPoint *src,
                             guint len);

poc_point_array_ref ()

PocPointArray *
poc_point_array_ref (PocPointArray *array);

Increments the reference count of array by one. This function is thread-safe and may be called from any thread.

Parameters

array

a PocPointArray

 

Returns

the PocPointArray


poc_point_array_unref ()

void
poc_point_array_unref (PocPointArray *array);

Increments the reference count of array by one. This function is thread-safe and may be called from any thread.

Parameters

array

a PocPointArray

 

poc_double_array_index()

#define poc_double_array_index(a,i) ((a)->data[(i)])

poc_double_array_len()

#define poc_double_array_len(a)		((a)->len)

poc_double_array_append_vals()

#define             poc_double_array_append_vals(a,v,n)

poc_double_array_append_val()

#define             poc_double_array_append_val(a,v)

poc_double_array_new ()

PocDoubleArray *
poc_double_array_new (void);

A wrapper for GArray to create an array of gdouble values.

Returns

a PocDoubleArray.

[transfer full]


poc_double_array_sized_new ()

PocDoubleArray *
poc_double_array_sized_new (guint reserved_size);

A wrapper for GArray to create an array of gdouble values with reserved_size elements preallocated. This avoids frequent reallocation, if you are going to add many elements to the array. Note however that the size of the array is still zero.

Parameters

reserved_size

number of elements preallocated

 

Returns

a PocDoubleArray.

[transfer full]


poc_double_array_set_size ()

PocDoubleArray *
poc_double_array_set_size (PocDoubleArray *array,
                           guint size);

Sets the size of the array, expanding it if necessary The new elements are set to 0.

Parameters

array

a PocDoubleArray

 

size

the new size of the array

 

Returns

the PocDoubleArray.

[transfer none]


poc_double_array_ref ()

PocDoubleArray *
poc_double_array_ref (PocDoubleArray *array);

Increments the reference count of array by one. This function is thread-safe and may be called from any thread.

Parameters

array

a PocDoubleArray

 

Returns

the PocDoubleArray


poc_double_array_unref ()

void
poc_double_array_unref (PocDoubleArray *array);

Increments the reference count of array by one. This function is thread-safe and may be called from any thread.

Parameters

array

a PocDoubleArray

 

poc_enum_to_string ()

const gchar *
poc_enum_to_string (GType enum_type,
                    gint value);

poc_enum_from_string ()

gint
poc_enum_from_string (GType enum_type,
                      const gchar *string);

poc_line_style_get_dashes ()

const double *
poc_line_style_get_dashes (PocLineStyle line_style,
                           int *num_dashes);

Types and Values

enum PocAxisMode

An enumerated type specifying the axis mode.

Members

POC_AXIS_LINEAR

Show a linear axis

 

POC_AXIS_LOG_OCTAVE

Show a logarithmic axis in octaves

 

POC_AXIS_LOG_DECADE

Show a logarithmic axis in decades

 

enum PocLineStyle

An enumerated type specifying the plot line style. These should be self explanatory.

Members

POC_LINE_STYLE_SOLID

solid line

 

POC_LINE_STYLE_DOTS

dotted line

 

POC_LINE_STYLE_DASH

dashed line

 

POC_LINE_STYLE_LONG_DASH

long dashes

 

POC_LINE_STYLE_DOT_DASH

dot-dash line

 

POC_LINE_STYLE_LONG_SHORT_DASH

long-short dashes

 

POC_LINE_STYLE_DOT_DOT_DASH

dot-dot-dash line