[gimp] Revert "app: apply a cap on brush scaling"
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Revert "app: apply a cap on brush scaling"
- Date: Sat, 15 Nov 2014 20:26:21 +0000 (UTC)
commit 7f6cdf635ae10088fe144b5b3a529245e0c5a568
Author: Alexia Death <alexiadeath gmail com>
Date: Sat Nov 15 22:25:59 2014 +0200
Revert "app: apply a cap on brush scaling"
This reverts commit 5a22fb57992671fc7bebf05b60653dc58f13320f.
app/core/gimpbrush.c | 16 ++--------------
app/core/gimpbrush.h | 1 -
app/paint/gimppaintoptions.c | 2 +-
3 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index 4cd356e..0ec34aa 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -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);
diff --git a/app/core/gimpbrush.h b/app/core/gimpbrush.h
index 53e2762..5c02710 100644
--- a/app/core/gimpbrush.h
+++ b/app/core/gimpbrush.h
@@ -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))
diff --git a/app/paint/gimppaintoptions.c b/app/paint/gimppaintoptions.c
index 4393719..a1c2e67 100644
--- a/app/paint/gimppaintoptions.c
+++ b/app/paint/gimppaintoptions.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]