![]() |
![]() |
![]() |
colord Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define CD_INTERP_ERROR #define CD_INTERP_TYPE_ERROR enum CdInterpError; enum CdInterpKind; void (*_cd_interp_reserved1) (void
); void (*_cd_interp_reserved2) (void
); void (*_cd_interp_reserved3) (void
); void (*_cd_interp_reserved4) (void
); void (*_cd_interp_reserved5) (void
); void (*_cd_interp_reserved6) (void
); void (*_cd_interp_reserved7) (void
); void (*_cd_interp_reserved8) (void
); GQuark cd_interp_error_quark (void
); gdouble cd_interp_eval (CdInterp *interp
,gdouble value
,GError **error
); CdInterpKind cd_interp_get_kind (CdInterp *interp
); guint cd_interp_get_size (CdInterp *interp
); GArray * cd_interp_get_x (CdInterp *interp
); GArray * cd_interp_get_y (CdInterp *interp
); void cd_interp_insert (CdInterp *interp
,gdouble x
,gdouble y
); const gchar * cd_interp_kind_to_string (CdInterpKind kind
); gboolean cd_interp_prepare (CdInterp *interp
,GError **error
); gdouble (*eval) (CdInterp *interp
,gdouble value
,GError **error
); gboolean (*prepare) (CdInterp *interp
,GError **error
);
typedef enum { CD_INTERP_ERROR_FAILED, CD_INTERP_ERROR_LAST } CdInterpError;
Errors that can be thrown
typedef enum { CD_INTERP_KIND_LINEAR, CD_INTERP_KIND_AKIMA, CD_INTERP_KIND_LAST } CdInterpKind;
The kind of interpolation.
GQuark cd_interp_error_quark (void
);
Returns : |
An error quark. |
Since 0.1.31
gdouble cd_interp_eval (CdInterp *interp
,gdouble value
,GError **error
);
Evaluate the interpolation function at a specific point.
You must have called cd_interp_insert()
and cd_interp_prepare()
before
calling this method.
|
a CdInterp instance. |
|
The X co-ordinate |
|
a GError or NULL
|
Returns : |
The Y co-ordinate, or -1 for error |
Since 0.1.31
CdInterpKind cd_interp_get_kind (CdInterp *interp
);
Gets the kind of INTERP file.
|
a CdInterp instance. |
Returns : |
a CdInterpKind, e.g CD_INTERP_KIND_AKIMA . |
Since 0.1.31
guint cd_interp_get_size (CdInterp *interp
);
Gets the number of items of data added with cd_interp_insert()
.
NOTE: This method has to be called after cd_interp_prepare()
and it returns
the number of items originally in the array.
If you need the updated private size then just use cd_interp_get_x()
and
read the size from that.
|
a CdInterp instance. |
Returns : |
The original array size |
Since 0.1.31
GArray * cd_interp_get_x (CdInterp *interp
);
Gets the X data used the interpolation.
NOTE: this is only guaranteed to return the data inserted by
cd_interp_insert()
*BEFORE* calling cd_interp_prepare()
.
After prepating the CdInterp this data should be considered an implementation detail.
|
a CdInterp instance. |
Returns : |
The X co-ordinate data. [transfer none][element-type gdouble] |
Since 0.1.31
GArray * cd_interp_get_y (CdInterp *interp
);
Gets the Y data used the interpolation.
NOTE: this is only guaranteed to return the data inserted by
cd_interp_insert()
*BEFORE* calling cd_interp_prepare()
.
After prepating the CdInterp this data should be considered an implementation detail.
|
a CdInterp instance. |
Returns : |
The Y co-ordinate data. [transfer none][element-type gdouble] |
Since 0.1.31
void cd_interp_insert (CdInterp *interp
,gdouble x
,gdouble y
);
Inserts data to be interpolated.
|
a CdInterp instance. |
|
X data |
|
Y data |
Since 0.1.31
gboolean cd_interp_prepare (CdInterp *interp
,GError **error
);
Prepares the data set so that cd_interp_eval()
can be used.
|
a CdInterp instance. |
Returns : |
TRUE for success |
Since 0.1.31