Revert "app: apply a cap on brush scaling"

This reverts commit 5a22fb5799.
This commit is contained in:
Alexia Death 2014-11-15 22:25:59 +02:00
parent 5a22fb5799
commit 7f6cdf635a
3 changed files with 3 additions and 16 deletions

View File

@ -580,33 +580,21 @@ gimp_brush_transform_size (GimpBrush *brush,
gint *width,
gint *height)
{
gdouble tmp_width;
gdouble tmp_height;
g_return_if_fail (GIMP_IS_BRUSH (brush));
g_return_if_fail (scale > 0.0);
g_return_if_fail (width != NULL);
g_return_if_fail (height != NULL);
tmp_width = gimp_temp_buf_get_width (brush->priv->mask);
tmp_height = gimp_temp_buf_get_height (brush->priv->mask);
if (scale == 1.0 &&
aspect_ratio == 0.0 &&
((angle == 0.0) || (angle == 0.5) || (angle == 1.0)))
{
*width = tmp_width;
*height = tmp_height;
*width = gimp_temp_buf_get_width (brush->priv->mask);
*height = gimp_temp_buf_get_height (brush->priv->mask);;
return;
}
/*Cap transform result for brushes or OOM can occur*/
if (((gdouble) MAX (tmp_width, tmp_height)) > GIMP_BRUSH_MAX_SIZE)
{
scale = GIMP_BRUSH_MAX_SIZE / (gdouble) MAX (tmp_width, tmp_height);
}
GIMP_BRUSH_GET_CLASS (brush)->transform_size (brush,
scale, aspect_ratio, angle,
width, height);

View File

@ -21,7 +21,6 @@
#include "gimpdata.h"
#define GIMP_BRUSH_MAX_SIZE 10000.0 /*Max size in either dimension in px*/
#define GIMP_TYPE_BRUSH (gimp_brush_get_type ())
#define GIMP_BRUSH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BRUSH, GimpBrush))

View File

@ -156,7 +156,7 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass)
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_BRUSH_SIZE,
"brush-size", _("Brush Size"),
1.0, GIMP_BRUSH_MAX_SIZE, DEFAULT_BRUSH_SIZE,
1.0, 10000.0, DEFAULT_BRUSH_SIZE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_BRUSH_ASPECT_RATIO,