app: add gegl:newsprint to Filters -> Distorts

and add a custom GUI constructor that does nothing special (yet).
This commit is contained in:
Michael Natterer 2019-07-17 18:24:33 +02:00
parent fb3007edef
commit d718da27a8
10 changed files with 113 additions and 0 deletions

View File

@ -479,6 +479,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
"gegl:cell-noise", "gegl:cell-noise",
GIMP_HELP_FILTER_NOISE_CELL }, GIMP_HELP_FILTER_NOISE_CELL },
{ "filters-newsprint", GIMP_ICON_GEGL,
NC_("filters-action", "_Newsprint..."), NULL, NULL,
"gegl:newsprint",
GIMP_HELP_FILTER_NEWSPRINT },
{ "filters-noise-cie-lch", GIMP_ICON_GEGL, { "filters-noise-cie-lch", GIMP_ICON_GEGL,
NC_("filters-action", "CIE lch Noise..."), NULL, NULL, NC_("filters-action", "CIE lch Noise..."), NULL, NULL,
"gegl:noise-cie-lch", "gegl:noise-cie-lch",

View File

@ -43,6 +43,8 @@ libapppropgui_a_SOURCES = \
gimppropgui-motion-blur-linear.h \ gimppropgui-motion-blur-linear.h \
gimppropgui-motion-blur-zoom.c \ gimppropgui-motion-blur-zoom.c \
gimppropgui-motion-blur-zoom.h \ gimppropgui-motion-blur-zoom.h \
gimppropgui-newsprint.c \
gimppropgui-newsprint.h \
gimppropgui-panorama-projection.c \ gimppropgui-panorama-projection.c \
gimppropgui-panorama-projection.h \ gimppropgui-panorama-projection.h \
gimppropgui-recursive-transform.c \ gimppropgui-recursive-transform.c \

View File

@ -0,0 +1,62 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimppropgui-newsprint.c
* Copyright (C) 2019 Michael Natterer <mitch@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "propgui-types.h"
#include "core/gimpcontext.h"
#include "gimppropgui.h"
#include "gimppropgui-generic.h"
#include "gimppropgui-newsprint.h"
#include "gimp-intl.h"
GtkWidget *
_gimp_prop_gui_new_newsprint (GObject *config,
GParamSpec **param_specs,
guint n_param_specs,
GeglRectangle *area,
GimpContext *context,
GimpCreatePickerFunc create_picker_func,
GimpCreateControllerFunc create_controller_func,
gpointer creator)
{
g_return_val_if_fail (G_IS_OBJECT (config), NULL);
g_return_val_if_fail (param_specs != NULL, NULL);
g_return_val_if_fail (n_param_specs > 0, NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
return _gimp_prop_gui_new_generic (config,
param_specs,
n_param_specs,
area,
context,
create_picker_func,
create_controller_func,
creator);
}

View File

@ -0,0 +1,35 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
*
* gimppropgui-newsprint.h
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_PROP_GUI_NEWSPRINT_H__
#define __GIMP_PROP_GUI_NEWSPRINT_H__
GtkWidget *
_gimp_prop_gui_new_newsprint (GObject *config,
GParamSpec **param_specs,
guint n_param_specs,
GeglRectangle *area,
GimpContext *context,
GimpCreatePickerFunc create_picker_func,
GimpCreateControllerFunc create_controller_func,
gpointer creator);
#endif /* __GIMP_PROP_GUI_NEWSPRINT_H__ */

View File

@ -57,6 +57,7 @@
#include "gimppropgui-motion-blur-circular.h" #include "gimppropgui-motion-blur-circular.h"
#include "gimppropgui-motion-blur-linear.h" #include "gimppropgui-motion-blur-linear.h"
#include "gimppropgui-motion-blur-zoom.h" #include "gimppropgui-motion-blur-zoom.h"
#include "gimppropgui-newsprint.h"
#include "gimppropgui-panorama-projection.h" #include "gimppropgui-panorama-projection.h"
#include "gimppropgui-recursive-transform.h" #include "gimppropgui-recursive-transform.h"
#include "gimppropgui-shadows-highlights.h" #include "gimppropgui-shadows-highlights.h"
@ -472,6 +473,8 @@ gui_new_funcs[] =
_gimp_prop_gui_new_motion_blur_linear }, _gimp_prop_gui_new_motion_blur_linear },
{ "GimpGegl-gegl-motion-blur-zoom-config", { "GimpGegl-gegl-motion-blur-zoom-config",
_gimp_prop_gui_new_motion_blur_zoom }, _gimp_prop_gui_new_motion_blur_zoom },
{ "GimpGegl-gegl-newsprint-config",
_gimp_prop_gui_new_newsprint },
{ "GimpGegl-gegl-panorama-projection-config", { "GimpGegl-gegl-panorama-projection-config",
_gimp_prop_gui_new_panorama_projection }, _gimp_prop_gui_new_panorama_projection },
{ "GimpGegl-gegl-recursive-transform-config", { "GimpGegl-gegl-recursive-transform-config",

View File

@ -663,9 +663,11 @@ sanity_check_gegl_ops (void)
"gegl:median-blur", "gegl:median-blur",
"gegl:mirrors", "gegl:mirrors",
"gegl:mono-mixer", "gegl:mono-mixer",
"gegl:mosaic",
"gegl:motion-blur-circular", "gegl:motion-blur-circular",
"gegl:motion-blur-linear", "gegl:motion-blur-linear",
"gegl:motion-blur-zoom", "gegl:motion-blur-zoom",
"gegl:newsprint",
"gegl:noise-cie-lch", "gegl:noise-cie-lch",
"gegl:noise-hsv", "gegl:noise-hsv",
"gegl:noise-hurl", "gegl:noise-hurl",

View File

@ -203,6 +203,7 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
"gegl:motion-blur-circular", "gegl:motion-blur-circular",
"gegl:motion-blur-linear", "gegl:motion-blur-linear",
"gegl:motion-blur-zoom", "gegl:motion-blur-zoom",
"gegl:newsprint",
"gegl:noise-cie-lch", "gegl:noise-cie-lch",
"gegl:noise-hsv", "gegl:noise-hsv",
"gegl:noise-hurl", "gegl:noise-hurl",

View File

@ -402,6 +402,7 @@
#define GIMP_HELP_FILTER_MOTION_BLUR_CIRCULAR "gimp-filter-motion-blur-circular" #define GIMP_HELP_FILTER_MOTION_BLUR_CIRCULAR "gimp-filter-motion-blur-circular"
#define GIMP_HELP_FILTER_MOTION_BLUR_LINEAR "gimp-filter-motion-blur-linear" #define GIMP_HELP_FILTER_MOTION_BLUR_LINEAR "gimp-filter-motion-blur-linear"
#define GIMP_HELP_FILTER_MOTION_BLUR_ZOOM "gimp-filter-motion-blur-zoom" #define GIMP_HELP_FILTER_MOTION_BLUR_ZOOM "gimp-filter-motion-blur-zoom"
#define GIMP_HELP_FILTER_NEWSPRINT "gimp-filter-newsprint"
#define GIMP_HELP_FILTER_NOISE_CELL "gimp-filter-noise-cell" #define GIMP_HELP_FILTER_NOISE_CELL "gimp-filter-noise-cell"
#define GIMP_HELP_FILTER_NOISE_CIE_LCH "gimp-filter-noise-cie-lch" #define GIMP_HELP_FILTER_NOISE_CIE_LCH "gimp-filter-noise-cie-lch"
#define GIMP_HELP_FILTER_NOISE_HSV "gimp-filter-noise-hsv" #define GIMP_HELP_FILTER_NOISE_HSV "gimp-filter-noise-hsv"

View File

@ -720,6 +720,7 @@
<menuitem action="filters-lens-distortion" /> <menuitem action="filters-lens-distortion" />
<menuitem action="filters-kaleidoscope" /> <menuitem action="filters-kaleidoscope" />
<menuitem action="filters-mosaic" /> <menuitem action="filters-mosaic" />
<menuitem action="filters-newsprint" />
<menuitem action="filters-polar-coordinates" /> <menuitem action="filters-polar-coordinates" />
<menuitem action="filters-ripple" /> <menuitem action="filters-ripple" />
<menuitem action="filters-shift" /> <menuitem action="filters-shift" />

View File

@ -395,6 +395,7 @@ app/propgui/gimppropgui-hue-saturation.c
app/propgui/gimppropgui-motion-blur-circular.c app/propgui/gimppropgui-motion-blur-circular.c
app/propgui/gimppropgui-motion-blur-linear.c app/propgui/gimppropgui-motion-blur-linear.c
app/propgui/gimppropgui-motion-blur-zoom.c app/propgui/gimppropgui-motion-blur-zoom.c
app/propgui/gimppropgui-newsprint.c
app/propgui/gimppropgui-panorama-projection.c app/propgui/gimppropgui-panorama-projection.c
app/propgui/gimppropgui-recursive-transform.c app/propgui/gimppropgui-recursive-transform.c
app/propgui/gimppropgui-shadows-highlights.c app/propgui/gimppropgui-shadows-highlights.c