[gimp] app: use BG fill in gimp_drawable_fill() if the drawable has no alpha
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use BG fill in gimp_drawable_fill() if the drawable has no alpha
- Date: Sun, 9 Oct 2016 19:31:30 +0000 (UTC)
commit a06f7e78f10a43a63a524da4c4720499f8fd977b
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 9 21:30:43 2016 +0200
app: use BG fill in gimp_drawable_fill() if the drawable has no alpha
app/core/gimpdrawable-fill.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpdrawable-fill.c b/app/core/gimpdrawable-fill.c
index 0907328..3d4caad 100644
--- a/app/core/gimpdrawable-fill.c
+++ b/app/core/gimpdrawable-fill.c
@@ -59,6 +59,12 @@ gimp_drawable_fill (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (GIMP_IS_CONTEXT (context));
+ if (fill_type == GIMP_FILL_TRANSPARENT &&
+ ! gimp_drawable_has_alpha (drawable))
+ {
+ fill_type = GIMP_FILL_BACKGROUND;
+ }
+
if (! gimp_get_fill_params (context, fill_type, &color, &pattern, NULL))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]