mirror of https://github.com/GNOME/gimp.git
libgimpbase: always allocate GimpPixPipeParams.placement, add docs
This commit is contained in:
parent
8bd4a4fac9
commit
f28ec4bf86
|
@ -61,10 +61,11 @@ gimp_pixpipe_params_init (GimpPixPipeParams *params)
|
|||
params->dim = 1;
|
||||
params->cols = 1;
|
||||
params->rows = 1;
|
||||
params->placement = "constant";
|
||||
params->free_placement_string = FALSE;
|
||||
params->placement = g_strdup ("constant");
|
||||
|
||||
for (i = 0; i < GIMP_PIXPIPE_MAXDIM; i++)
|
||||
params->selection[i] = g_strdup ("random");
|
||||
|
||||
params->rank[0] = 1;
|
||||
for (i = 1; i < GIMP_PIXPIPE_MAXDIM; i++)
|
||||
params->rank[i] = 0;
|
||||
|
@ -133,8 +134,8 @@ gimp_pixpipe_params_parse (const gchar *string,
|
|||
{
|
||||
if (r)
|
||||
{
|
||||
g_free (params->placement);
|
||||
params->placement = g_strdup (r + 1);
|
||||
params->free_placement_string = TRUE;
|
||||
}
|
||||
}
|
||||
else if (strncmp (p, "rank", strlen ("rank")) == 0 && r)
|
||||
|
@ -196,9 +197,8 @@ gimp_pixpipe_params_free (GimpPixPipeParams *params)
|
|||
{
|
||||
gint i;
|
||||
|
||||
g_free (params->placement);
|
||||
|
||||
for (i = 0; i < GIMP_PIXPIPE_MAXDIM; i++)
|
||||
g_free (params->selection[i]);
|
||||
|
||||
if (params->free_placement_string)
|
||||
g_free (params->placement);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,23 @@ G_BEGIN_DECLS
|
|||
|
||||
typedef struct _GimpPixPipeParams GimpPixPipeParams;
|
||||
|
||||
/**
|
||||
* GimpPixPipeParams:
|
||||
* @step: Step
|
||||
* @ncells: Number of cells
|
||||
* @dim: Dimension
|
||||
* @cols: Columns
|
||||
* @rows: Rows
|
||||
* @cellwidth: Cell width
|
||||
* @cellheight: Cell height
|
||||
* @placement: Placement
|
||||
* @free_placement_string: Unused, ignore
|
||||
* @rank: Rank
|
||||
* @selection: Selection
|
||||
* @free_selection_string: Unused, ignore
|
||||
*
|
||||
* PLease somebody help documenting this.
|
||||
**/
|
||||
struct _GimpPixPipeParams
|
||||
{
|
||||
gint step;
|
||||
|
|
Loading…
Reference in New Issue