Commit b4f721cd authored by Michael Natterer's avatar Michael Natterer 😴

pdb: set value ranges on PDB brush parameters/return values

Also fix a few glitches and spelling.
parent 548df1fa
......@@ -807,7 +807,7 @@ context_set_brush_hardness_invoker (GimpProcedure *procedure,
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-spacing", (gdouble) hardness,
"brush-hardness", (gdouble) hardness,
NULL);
g_list_free (options);
......@@ -904,7 +904,7 @@ context_set_brush_force_invoker (GimpProcedure *procedure,
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-spacing", (gdouble) force,
"brush-force", (gdouble) force,
NULL);
g_list_free (options);
......@@ -2658,7 +2658,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("size",
"size",
"brush size in pixels",
"Brush size in pixels",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2681,7 +2681,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("size",
"size",
"brush size in pixels",
"Brush size in pixels",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2721,7 +2721,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("aspect",
"aspect",
"aspect ratio",
"Aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2744,7 +2744,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("aspect",
"aspect",
"aspect ratio",
"Aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2767,7 +2767,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("angle",
"angle",
"angle in degrees",
"Angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2790,7 +2790,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
"angle in degrees",
"Angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2813,7 +2813,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("spacing",
"spacing",
"brush spacing as percent of size",
"Brush spacing as percent of size",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2836,7 +2836,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("spacing",
"spacing",
"brush spacing as percent of size",
"Brush spacing as percent of size",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -2876,8 +2876,8 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("hardness",
"hardness",
"brush hardness",
0, G_MAXDOUBLE, 0,
"Brush hardness",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -2899,8 +2899,8 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hardness",
"hardness",
"brush hardness",
0, G_MAXDOUBLE, 0,
"Brush hardness",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -2939,8 +2939,8 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("force",
"force",
"brush application force",
0, G_MAXDOUBLE, 0,
"Brush application force",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -2962,8 +2962,8 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
g_param_spec_double ("force",
"force",
"brush application force",
0, G_MAXDOUBLE, 0,
"Brush application force",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
......@@ -642,7 +642,7 @@ gimp_context_set_brush (const gchar *name)
*
* Get the brush size in pixels for brush based paint tools.
*
* Returns: brush size in pixels.
* Returns: Brush size in pixels.
*
* Since: GIMP 2.8
**/
......@@ -667,7 +667,7 @@ gimp_context_get_brush_size (void)
/**
* gimp_context_set_brush_size:
* @size: brush size in pixels.
* @size: Brush size in pixels.
*
* Set brush size in pixels.
*
......@@ -733,7 +733,7 @@ gimp_context_set_brush_default_size (void)
*
* Set the aspect ratio for brush based paint tools.
*
* Returns: aspect ratio.
* Returns: Aspect ratio.
*
* Since: GIMP 2.8
**/
......@@ -758,7 +758,7 @@ gimp_context_get_brush_aspect_ratio (void)
/**
* gimp_context_set_brush_aspect_ratio:
* @aspect: aspect ratio.
* @aspect: Aspect ratio.
*
* Set brush aspect ratio.
*
......@@ -794,7 +794,7 @@ gimp_context_set_brush_aspect_ratio (gdouble aspect)
*
* Set the angle in degrees for brush based paint tools.
*
* Returns: angle in degrees.
* Returns: Angle in degrees.
*
* Since: GIMP 2.8
**/
......@@ -819,7 +819,7 @@ gimp_context_get_brush_angle (void)
/**
* gimp_context_set_brush_angle:
* @angle: angle in degrees.
* @angle: Angle in degrees.
*
* Set brush angle in degrees.
*
......@@ -856,7 +856,7 @@ gimp_context_set_brush_angle (gdouble angle)
* Get the brush spacing as percent of size for brush based paint
* tools.
*
* Returns: brush spacing as percent of size.
* Returns: Brush spacing as percent of size.
*
* Since: GIMP 2.10
**/
......@@ -881,7 +881,7 @@ gimp_context_get_brush_spacing (void)
/**
* gimp_context_set_brush_spacing:
* @spacing: brush spacing as percent of size.
* @spacing: Brush spacing as percent of size.
*
* Set brush spacing as percent of size.
*
......@@ -948,7 +948,7 @@ gimp_context_set_brush_default_spacing (void)
*
* Get the brush hardness for brush based paint tools.
*
* Returns: brush hardness.
* Returns: Brush hardness.
*
* Since: GIMP 2.10
**/
......@@ -973,7 +973,7 @@ gimp_context_get_brush_hardness (void)
/**
* gimp_context_set_brush_hardness:
* @hardness: brush hardness.
* @hardness: Brush hardness.
*
* Set brush hardness.
*
......@@ -1039,7 +1039,7 @@ gimp_context_set_brush_default_hardness (void)
*
* Get the brush application force for brush based paint tools.
*
* Returns: brush application force.
* Returns: Brush application force.
*
* Since: GIMP 2.10
**/
......@@ -1064,7 +1064,7 @@ gimp_context_get_brush_force (void)
/**
* gimp_context_set_brush_force:
* @force: brush application force.
* @force: Brush application force.
*
* Set brush application force.
*
......
......@@ -495,7 +495,7 @@ sub context_get_brush_size {
@outargs = (
{ name => "size", type => "0 < float",
desc => "brush size in pixels" }
desc => "Brush size in pixels" }
);
%invoke = (
......@@ -525,7 +525,7 @@ sub context_set_brush_size {
@inargs = (
{ name => "size", type => "0 < float",
desc => "brush size in pixels" }
desc => "Brush size in pixels" }
);
%invoke = (
......@@ -590,7 +590,7 @@ sub context_set_brush_aspect_ratio {
@inargs = (
{ name => "aspect", type => "-20 <= float <= 20",
desc => "aspect ratio" }
desc => "Aspect ratio" }
);
%invoke = (
......@@ -620,7 +620,7 @@ sub context_get_brush_aspect_ratio {
@outargs = (
{ name => "aspect", type => "-20 <= float <= 20",
desc => "aspect ratio" }
desc => "Aspect ratio" }
);
%invoke = (
......@@ -650,7 +650,7 @@ sub context_set_brush_angle {
@inargs = (
{ name => "angle", type => "-180 <= float <= 180",
desc => "angle in degrees" }
desc => "Angle in degrees" }
);
%invoke = (
......@@ -680,7 +680,7 @@ sub context_get_brush_angle {
@outargs = (
{ name => "angle", type => "-180 <= float <= 180",
desc => "angle in degrees" }
desc => "Angle in degrees" }
);
%invoke = (
......@@ -710,7 +710,7 @@ sub context_get_brush_spacing {
@outargs = (
{ name => "spacing", type => "0 < float",
desc => "brush spacing as percent of size" }
desc => "Brush spacing as percent of size" }
);
%invoke = (
......@@ -740,7 +740,7 @@ sub context_set_brush_spacing {
@inargs = (
{ name => "spacing", type => "0 < float",
desc => "brush spacing as percent of size" }
desc => "Brush spacing as percent of size" }
);
%invoke = (
......@@ -804,8 +804,8 @@ sub context_get_brush_hardness {
&adeath_pdb_misc('2014', '2.10');
@outargs = (
{ name => "hardness", type => "0 < float",
desc => "brush hardness" }
{ name => "hardness", type => "0.0 <= float <= 1.0",
desc => "Brush hardness" }
);
%invoke = (
......@@ -834,8 +834,8 @@ sub context_set_brush_hardness {
&adeath_pdb_misc('2014', '2.10');
@inargs = (
{ name => "hardness", type => "0 < float",
desc => "brush hardness" }
{ name => "hardness", type => "0.0 <= float <= 1.0",
desc => "Brush hardness" }
);
%invoke = (
......@@ -848,7 +848,7 @@ sub context_set_brush_hardness {
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-spacing", (gdouble) hardness,
"brush-hardness", (gdouble) hardness,
NULL);
g_list_free (options);
......@@ -899,8 +899,8 @@ sub context_get_brush_force {
&adeath_pdb_misc('2014', '2.10');
@outargs = (
{ name => "force", type => "0 < float",
desc => "brush application force" }
{ name => "force", type => "0.0 <= float <= 1.0",
desc => "Brush application force" }
);
%invoke = (
......@@ -929,8 +929,8 @@ sub context_set_brush_force {
&adeath_pdb_misc('2014', '2.10');
@inargs = (
{ name => "force", type => "0 < float",
desc => "brush application force" }
{ name => "force", type => "0.0 <= float <= 1.0",
desc => "Brush application force" }
);
%invoke = (
......@@ -943,7 +943,7 @@ sub context_set_brush_force {
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-spacing", (gdouble) force,
"brush-force", (gdouble) force,
NULL);
g_list_free (options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment