Commit 65bfd700 authored by Sven Neumann's avatar Sven Neumann

in layer_new_from_tiles check if image_type has alpha to avoid obscure

* app/layer.c: in layer_new_from_tiles check if image_type has alpha
  to avoid obscure bugs if the function is not called correctly

* app/text_tool_cmds.c
* tools/pdbgen/pdb/text_tool.pdb: added a hint about using border = -1
  to suppress cropping of empty spaces around the text


--Sven
parent 66e95bbd
Tue Jan 11 23:50:53 CET 2000 Sven Neumann <sven@gimp.org>
* app/layer.c: in layer_new_from_tiles check if image_type has alpha
to avoid obscure bugs if the function is not called correctly
* app/text_tool_cmds.c
* tools/pdbgen/pdb/text_tool.pdb: added a hint about using border = -1
to suppress cropping of empty spaces around the text
Tue Jan 11 14:36:55 PST 2000 Manish Singh <yosh@gimp.org>
* libgimp/gimpcompat.h: let's not be redundant redundant. Made
......
......@@ -411,6 +411,9 @@ layer_new_from_tiles (GimpImage *gimage,
/* If no image or no tile manager, return NULL */
if (!gimage || !tiles )
return NULL;
/* the layer_type needs to have alpha */
g_return_val_if_fail (TYPE_HAS_ALPHA (layer_type), NULL);
/* Create the new layer */
new_layer = layer_new (0, tiles->width, tiles->height,
......
......@@ -411,6 +411,9 @@ layer_new_from_tiles (GimpImage *gimage,
/* If no image or no tile manager, return NULL */
if (!gimage || !tiles )
return NULL;
/* the layer_type needs to have alpha */
g_return_val_if_fail (TYPE_HAS_ALPHA (layer_type), NULL);
/* Create the new layer */
new_layer = layer_new (0, tiles->width, tiles->height,
......
......@@ -411,6 +411,9 @@ layer_new_from_tiles (GimpImage *gimage,
/* If no image or no tile manager, return NULL */
if (!gimage || !tiles )
return NULL;
/* the layer_type needs to have alpha */
g_return_val_if_fail (TYPE_HAS_ALPHA (layer_type), NULL);
/* Create the new layer */
new_layer = layer_new (0, tiles->width, tiles->height,
......
......@@ -310,7 +310,8 @@ static ProcRecord text_fontname_proc =
{
"gimp_text_fontname",
"Add text at the specified location as a floating selection or a new layer.",
"This tool requires font information as a fontname conforming to the 'X Logical Font Description Conventions'. You can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels.",
"This tool requires font information as a fontname conforming to the 'X Logical Font Description Conventions'. You can specify the fontsize in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text. The border is measured in pixels. If the"
"border is specified as -1, empty spaces around the text will not be cropped.",
"Martin Edlman & Sven Neumann",
"Spencer Kimball & Peter Mattis",
"1998",
......@@ -613,7 +614,7 @@ static ProcRecord text_proc =
"gimp_text",
"Add text at the specified location as a floating selection or a new layer.",
"This tool requires font information in the form of nine parameters: size, foundry, family, weight, slant, set_width, spacing, registry, encoding. The font size can either be specified in units of pixels or points, and the appropriate metric is specified using the size_type argument. The x and y parameters together control the placement of the new text by specifying the upper left corner of the text bounding box. If the antialias parameter is non-zero, the generated text will blend more smoothly with underlying layers. This option requires more time and memory to compute than non-antialiased text; the resulting floating selection or layer, however, will require the same amount of memory with or without antialiasing. If the specified drawable parameter is valid, the text will be created as a floating selection attached to the drawable. If the drawable parameter is not valid (-1), the text will appear as a new layer. Finally, a border can be specified around the final rendered text."
"The border is measured in pixels.",
"The border is measured in pixels. If the border is specified as -1, empty spaces around the text will not be cropped.",
"Martin Edlman",
"Spencer Kimball & Peter Mattis",
"1998",
......
......@@ -113,7 +113,9 @@ will require the same amount of memory with or without antialiasing. If the
specified drawable parameter is valid, the text will be created as a floating
selection attached to the drawable. If the drawable parameter is not valid
(-1), the text will appear as a new layer. Finally, a border can be specified
around the final rendered text. The border is measured in pixels.
around the final rendered text. The border is measured in pixels. If the
border is specified as -1, empty spaces around the text will not be cropped.
HELP
&pdb_misc;
......@@ -203,7 +205,8 @@ amount of memory with or without antialiasing. If the specified drawable
parameter is valid, the text will be created as a floating selection attached
to the drawable. If the drawable parameter is not valid (-1), the text will
appear as a new layer. Finally, a border can be specified around the final
rendered text. The border is measured in pixels.
rendered text. The border is measured in pixels. If the border is specified
as -1, empty spaces around the text will not be cropped.
HELP
&pdb_misc;
......
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