diff options
Diffstat (limited to '')
-rw-r--r-- | plug-ins/pagecurl/Makefile.am | 82 | ||||
-rw-r--r-- | plug-ins/pagecurl/Makefile.in | 1033 | ||||
-rw-r--r-- | plug-ins/pagecurl/curl0.png | bin | 0 -> 445 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl1.png | bin | 0 -> 487 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl2.png | bin | 0 -> 476 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl3.png | bin | 0 -> 450 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl4.png | bin | 0 -> 431 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl5.png | bin | 0 -> 474 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl6.png | bin | 0 -> 488 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/curl7.png | bin | 0 -> 448 bytes | |||
-rw-r--r-- | plug-ins/pagecurl/pagecurl.c | 1028 |
11 files changed, 2143 insertions, 0 deletions
diff --git a/plug-ins/pagecurl/Makefile.am b/plug-ins/pagecurl/Makefile.am new file mode 100644 index 0000000..4640fe0 --- /dev/null +++ b/plug-ins/pagecurl/Makefile.am @@ -0,0 +1,82 @@ +## Process this file with automake to produce Makefile.in + +if OS_WIN32 +mwindows = -mwindows +else +libm = -lm +endif + +libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la +libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la +libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la +libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la +libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la +libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la +libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la + +if HAVE_WINDRES +include $(top_srcdir)/build/windows/gimprc-plug-ins.rule +pagecurl_RC = pagecurl.rc.o +endif + +AM_LDFLAGS = $(mwindows) + +libexecdir = $(gimpplugindir)/plug-ins/pagecurl + +libexec_PROGRAMS = pagecurl + +pagecurl_SOURCES = pagecurl.c + +BUILT_SOURCES = pagecurl-icons.c + +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + $(GTK_CFLAGS) \ + $(GEGL_CFLAGS) \ + -I$(includedir) + +LDADD = \ + $(libm) \ + $(libgimpui) \ + $(libgimpwidgets) \ + $(libgimpconfig) \ + $(libgimp) \ + $(libgimpcolor) \ + $(libgimpmath) \ + $(libgimpbase) \ + $(GTK_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(pagecurl_RC) + + +PAGECURL_IMAGES = \ + curl0.png \ + curl1.png \ + curl2.png \ + curl3.png \ + curl4.png \ + curl5.png \ + curl6.png \ + curl7.png + +EXTRA_DIST = $(PAGECURL_IMAGES) + +CLEANFILES = $(BUILT_SOURCES) pagecurl-icons.gresource.xml + +pagecurl-icons.gresource.xml: $(PAGECURL_IMAGES) Makefile.am + $(AM_V_GEN) ( rm -f $@; \ + echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \ + echo '<gresources>' >> $@; \ + echo ' <gresource prefix="/org/gimp/pagecurl-icons">' >> $@; \ + for image in $(PAGECURL_IMAGES); do \ + echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \ + done; \ + echo ' </gresource>' >> $@; \ + echo '</gresources>' >> $@ ) + +pagecurl-icons.c: pagecurl-icons.gresource.xml + $(AM_V_GEN) $(HOST_GLIB_COMPILE_RESOURCES) \ + --sourcedir=$(srcdir) --generate-source \ + --target=$@ pagecurl-icons.gresource.xml diff --git a/plug-ins/pagecurl/Makefile.in b/plug-ins/pagecurl/Makefile.in new file mode 100644 index 0000000..e259d57 --- /dev/null +++ b/plug-ins/pagecurl/Makefile.in @@ -0,0 +1,1033 @@ +# Makefile.in generated by automake 1.16.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Version resources for Microsoft Windows + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +libexec_PROGRAMS = pagecurl$(EXEEXT) +subdir = plug-ins/pagecurl +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4macros/gtk-doc.m4 \ + $(top_srcdir)/m4macros/intltool.m4 \ + $(top_srcdir)/m4macros/libtool.m4 \ + $(top_srcdir)/m4macros/ltoptions.m4 \ + $(top_srcdir)/m4macros/ltsugar.m4 \ + $(top_srcdir)/m4macros/ltversion.m4 \ + $(top_srcdir)/m4macros/lt~obsolete.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/m4macros/alsa.m4 \ + $(top_srcdir)/m4macros/ax_compare_version.m4 \ + $(top_srcdir)/m4macros/ax_cxx_compile_stdcxx.m4 \ + $(top_srcdir)/m4macros/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4macros/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4macros/ax_prog_perl_version.m4 \ + $(top_srcdir)/m4macros/detectcflags.m4 \ + $(top_srcdir)/m4macros/pythondev.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(libexecdir)" +PROGRAMS = $(libexec_PROGRAMS) +am_pagecurl_OBJECTS = pagecurl.$(OBJEXT) +pagecurl_OBJECTS = $(am_pagecurl_OBJECTS) +pagecurl_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +pagecurl_DEPENDENCIES = $(am__DEPENDENCIES_1) $(libgimpui) \ + $(libgimpwidgets) $(libgimpconfig) $(libgimp) $(libgimpcolor) \ + $(libgimpmath) $(libgimpbase) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(pagecurl_RC) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/pagecurl.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(pagecurl_SOURCES) +DIST_SOURCES = $(pagecurl_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build/windows/gimprc-plug-ins.rule \ + $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +AA_LIBS = @AA_LIBS@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALL_LINGUAS = @ALL_LINGUAS@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPSTREAM_UTIL = @APPSTREAM_UTIL@ +AR = @AR@ +AS = @AS@ +ATK_CFLAGS = @ATK_CFLAGS@ +ATK_LIBS = @ATK_LIBS@ +ATK_REQUIRED_VERSION = @ATK_REQUIRED_VERSION@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BABL_CFLAGS = @BABL_CFLAGS@ +BABL_LIBS = @BABL_LIBS@ +BABL_REQUIRED_VERSION = @BABL_REQUIRED_VERSION@ +BUG_REPORT_URL = @BUG_REPORT_URL@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZIP2_LIBS = @BZIP2_LIBS@ +CAIRO_CFLAGS = @CAIRO_CFLAGS@ +CAIRO_LIBS = @CAIRO_LIBS@ +CAIRO_PDF_CFLAGS = @CAIRO_PDF_CFLAGS@ +CAIRO_PDF_LIBS = @CAIRO_PDF_LIBS@ +CAIRO_PDF_REQUIRED_VERSION = @CAIRO_PDF_REQUIRED_VERSION@ +CAIRO_REQUIRED_VERSION = @CAIRO_REQUIRED_VERSION@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CC_VERSION = @CC_VERSION@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DESKTOP_DATADIR = @DESKTOP_DATADIR@ +DESKTOP_FILE_VALIDATE = @DESKTOP_FILE_VALIDATE@ +DLLTOOL = @DLLTOOL@ +DOC_SHOOTER = @DOC_SHOOTER@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FILE_AA = @FILE_AA@ +FILE_EXR = @FILE_EXR@ +FILE_HEIF = @FILE_HEIF@ +FILE_JP2_LOAD = @FILE_JP2_LOAD@ +FILE_MNG = @FILE_MNG@ +FILE_PDF_SAVE = @FILE_PDF_SAVE@ +FILE_PS = @FILE_PS@ +FILE_WMF = @FILE_WMF@ +FILE_XMC = @FILE_XMC@ +FILE_XPM = @FILE_XPM@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FONTCONFIG_REQUIRED_VERSION = @FONTCONFIG_REQUIRED_VERSION@ +FREETYPE2_REQUIRED_VERSION = @FREETYPE2_REQUIRED_VERSION@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GDK_PIXBUF_CFLAGS = @GDK_PIXBUF_CFLAGS@ +GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ +GDK_PIXBUF_LIBS = @GDK_PIXBUF_LIBS@ +GDK_PIXBUF_REQUIRED_VERSION = @GDK_PIXBUF_REQUIRED_VERSION@ +GEGL = @GEGL@ +GEGL_CFLAGS = @GEGL_CFLAGS@ +GEGL_LIBS = @GEGL_LIBS@ +GEGL_MAJOR_MINOR_VERSION = @GEGL_MAJOR_MINOR_VERSION@ +GEGL_REQUIRED_VERSION = @GEGL_REQUIRED_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GEXIV2_CFLAGS = @GEXIV2_CFLAGS@ +GEXIV2_LIBS = @GEXIV2_LIBS@ +GEXIV2_REQUIRED_VERSION = @GEXIV2_REQUIRED_VERSION@ +GIMP_API_VERSION = @GIMP_API_VERSION@ +GIMP_APP_VERSION = @GIMP_APP_VERSION@ +GIMP_BINARY_AGE = @GIMP_BINARY_AGE@ +GIMP_COMMAND = @GIMP_COMMAND@ +GIMP_DATA_VERSION = @GIMP_DATA_VERSION@ +GIMP_FULL_NAME = @GIMP_FULL_NAME@ +GIMP_INTERFACE_AGE = @GIMP_INTERFACE_AGE@ +GIMP_MAJOR_VERSION = @GIMP_MAJOR_VERSION@ +GIMP_MICRO_VERSION = @GIMP_MICRO_VERSION@ +GIMP_MINOR_VERSION = @GIMP_MINOR_VERSION@ +GIMP_MKENUMS = @GIMP_MKENUMS@ +GIMP_MODULES = @GIMP_MODULES@ +GIMP_PACKAGE_REVISION = @GIMP_PACKAGE_REVISION@ +GIMP_PKGCONFIG_VERSION = @GIMP_PKGCONFIG_VERSION@ +GIMP_PLUGINS = @GIMP_PLUGINS@ +GIMP_PLUGIN_VERSION = @GIMP_PLUGIN_VERSION@ +GIMP_REAL_VERSION = @GIMP_REAL_VERSION@ +GIMP_SYSCONF_VERSION = @GIMP_SYSCONF_VERSION@ +GIMP_TOOL_VERSION = @GIMP_TOOL_VERSION@ +GIMP_UNSTABLE = @GIMP_UNSTABLE@ +GIMP_USER_VERSION = @GIMP_USER_VERSION@ +GIMP_VERSION = @GIMP_VERSION@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ +GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ +GIO_WINDOWS_CFLAGS = @GIO_WINDOWS_CFLAGS@ +GIO_WINDOWS_LIBS = @GIO_WINDOWS_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@ +GMODULE_NO_EXPORT_CFLAGS = @GMODULE_NO_EXPORT_CFLAGS@ +GMODULE_NO_EXPORT_LIBS = @GMODULE_NO_EXPORT_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GS_LIBS = @GS_LIBS@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +GTK_MAC_INTEGRATION_CFLAGS = @GTK_MAC_INTEGRATION_CFLAGS@ +GTK_MAC_INTEGRATION_LIBS = @GTK_MAC_INTEGRATION_LIBS@ +GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@ +GTK_UPDATE_ICON_CACHE = @GTK_UPDATE_ICON_CACHE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ +HAVE_CXX14 = @HAVE_CXX14@ +HAVE_FINITE = @HAVE_FINITE@ +HAVE_ISFINITE = @HAVE_ISFINITE@ +HAVE_VFORK = @HAVE_VFORK@ +HOST_GLIB_COMPILE_RESOURCES = @HOST_GLIB_COMPILE_RESOURCES@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_REQUIRED_VERSION = @INTLTOOL_REQUIRED_VERSION@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ +INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ +INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ +INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISO_CODES_LOCALEDIR = @ISO_CODES_LOCALEDIR@ +ISO_CODES_LOCATION = @ISO_CODES_LOCATION@ +JPEG_LIBS = @JPEG_LIBS@ +JSON_GLIB_CFLAGS = @JSON_GLIB_CFLAGS@ +JSON_GLIB_LIBS = @JSON_GLIB_LIBS@ +LCMS_CFLAGS = @LCMS_CFLAGS@ +LCMS_LIBS = @LCMS_LIBS@ +LCMS_REQUIRED_VERSION = @LCMS_REQUIRED_VERSION@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBBACKTRACE_LIBS = @LIBBACKTRACE_LIBS@ +LIBHEIF_CFLAGS = @LIBHEIF_CFLAGS@ +LIBHEIF_LIBS = @LIBHEIF_LIBS@ +LIBHEIF_REQUIRED_VERSION = @LIBHEIF_REQUIRED_VERSION@ +LIBLZMA_REQUIRED_VERSION = @LIBLZMA_REQUIRED_VERSION@ +LIBMYPAINT_CFLAGS = @LIBMYPAINT_CFLAGS@ +LIBMYPAINT_LIBS = @LIBMYPAINT_LIBS@ +LIBMYPAINT_REQUIRED_VERSION = @LIBMYPAINT_REQUIRED_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBPNG_REQUIRED_VERSION = @LIBPNG_REQUIRED_VERSION@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIBUNWIND_REQUIRED_VERSION = @LIBUNWIND_REQUIRED_VERSION@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LT_VERSION_INFO = @LT_VERSION_INFO@ +LZMA_CFLAGS = @LZMA_CFLAGS@ +LZMA_LIBS = @LZMA_LIBS@ +MAIL = @MAIL@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MIME_INFO_CFLAGS = @MIME_INFO_CFLAGS@ +MIME_INFO_LIBS = @MIME_INFO_LIBS@ +MIME_TYPES = @MIME_TYPES@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MMX_EXTRA_CFLAGS = @MMX_EXTRA_CFLAGS@ +MNG_CFLAGS = @MNG_CFLAGS@ +MNG_LIBS = @MNG_LIBS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +MYPAINT_BRUSHES_CFLAGS = @MYPAINT_BRUSHES_CFLAGS@ +MYPAINT_BRUSHES_LIBS = @MYPAINT_BRUSHES_LIBS@ +NATIVE_GLIB_CFLAGS = @NATIVE_GLIB_CFLAGS@ +NATIVE_GLIB_LIBS = @NATIVE_GLIB_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENEXR_CFLAGS = @OPENEXR_CFLAGS@ +OPENEXR_LIBS = @OPENEXR_LIBS@ +OPENEXR_REQUIRED_VERSION = @OPENEXR_REQUIRED_VERSION@ +OPENJPEG_CFLAGS = @OPENJPEG_CFLAGS@ +OPENJPEG_LIBS = @OPENJPEG_LIBS@ +OPENJPEG_REQUIRED_VERSION = @OPENJPEG_REQUIRED_VERSION@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PANGOCAIRO_CFLAGS = @PANGOCAIRO_CFLAGS@ +PANGOCAIRO_LIBS = @PANGOCAIRO_LIBS@ +PANGOCAIRO_REQUIRED_VERSION = @PANGOCAIRO_REQUIRED_VERSION@ +PATHSEP = @PATHSEP@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_REQUIRED_VERSION = @PERL_REQUIRED_VERSION@ +PERL_VERSION = @PERL_VERSION@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +POFILES = @POFILES@ +POPPLER_CFLAGS = @POPPLER_CFLAGS@ +POPPLER_DATA_CFLAGS = @POPPLER_DATA_CFLAGS@ +POPPLER_DATA_LIBS = @POPPLER_DATA_LIBS@ +POPPLER_DATA_REQUIRED_VERSION = @POPPLER_DATA_REQUIRED_VERSION@ +POPPLER_LIBS = @POPPLER_LIBS@ +POPPLER_REQUIRED_VERSION = @POPPLER_REQUIRED_VERSION@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYBIN_PATH = @PYBIN_PATH@ +PYCAIRO_CFLAGS = @PYCAIRO_CFLAGS@ +PYCAIRO_LIBS = @PYCAIRO_LIBS@ +PYGIMP_EXTRA_CFLAGS = @PYGIMP_EXTRA_CFLAGS@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYLINK_LIBS = @PYLINK_LIBS@ +PYTHON = @PYTHON@ +PYTHON2_REQUIRED_VERSION = @PYTHON2_REQUIRED_VERSION@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RSVG_REQUIRED_VERSION = @RSVG_REQUIRED_VERSION@ +RT_LIBS = @RT_LIBS@ +SCREENSHOT_LIBS = @SCREENSHOT_LIBS@ +SED = @SED@ +SENDMAIL = @SENDMAIL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOCKET_LIBS = @SOCKET_LIBS@ +SSE2_EXTRA_CFLAGS = @SSE2_EXTRA_CFLAGS@ +SSE4_1_EXTRA_CFLAGS = @SSE4_1_EXTRA_CFLAGS@ +SSE_EXTRA_CFLAGS = @SSE_EXTRA_CFLAGS@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +SYMPREFIX = @SYMPREFIX@ +TIFF_LIBS = @TIFF_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WEBKIT_CFLAGS = @WEBKIT_CFLAGS@ +WEBKIT_LIBS = @WEBKIT_LIBS@ +WEBKIT_REQUIRED_VERSION = @WEBKIT_REQUIRED_VERSION@ +WEBPDEMUX_CFLAGS = @WEBPDEMUX_CFLAGS@ +WEBPDEMUX_LIBS = @WEBPDEMUX_LIBS@ +WEBPMUX_CFLAGS = @WEBPMUX_CFLAGS@ +WEBPMUX_LIBS = @WEBPMUX_LIBS@ +WEBP_CFLAGS = @WEBP_CFLAGS@ +WEBP_LIBS = @WEBP_LIBS@ +WEBP_REQUIRED_VERSION = @WEBP_REQUIRED_VERSION@ +WEB_PAGE = @WEB_PAGE@ +WIN32_LARGE_ADDRESS_AWARE = @WIN32_LARGE_ADDRESS_AWARE@ +WINDRES = @WINDRES@ +WMF_CFLAGS = @WMF_CFLAGS@ +WMF_CONFIG = @WMF_CONFIG@ +WMF_LIBS = @WMF_LIBS@ +WMF_REQUIRED_VERSION = @WMF_REQUIRED_VERSION@ +XDG_EMAIL = @XDG_EMAIL@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_REQUIRED_VERSION = @XGETTEXT_REQUIRED_VERSION@ +XMC_CFLAGS = @XMC_CFLAGS@ +XMC_LIBS = @XMC_LIBS@ +XMKMF = @XMKMF@ +XMLLINT = @XMLLINT@ +XMU_LIBS = @XMU_LIBS@ +XPM_LIBS = @XPM_LIBS@ +XSLTPROC = @XSLTPROC@ +XVFB_RUN = @XVFB_RUN@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gimpdatadir = @gimpdatadir@ +gimpdir = @gimpdir@ +gimplocaledir = @gimplocaledir@ +gimpplugindir = @gimpplugindir@ +gimpsysconfdir = @gimpsysconfdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +intltool__v_merge_options_ = @intltool__v_merge_options_@ +intltool__v_merge_options_0 = @intltool__v_merge_options_0@ +libdir = @libdir@ +libexecdir = $(gimpplugindir)/plug-ins/pagecurl +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +manpage_gimpdir = @manpage_gimpdir@ +mkdir_p = @mkdir_p@ +ms_librarian = @ms_librarian@ +mypaint_brushes_dir = @mypaint_brushes_dir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@OS_WIN32_TRUE@mwindows = -mwindows +@OS_WIN32_FALSE@libm = -lm +libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la +libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la +libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la +libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la +libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la +libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la +libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la +@HAVE_WINDRES_TRUE@GIMPPLUGINRC = $(top_builddir)/build/windows/gimp-plug-ins.rc +@HAVE_WINDRES_TRUE@pagecurl_RC = pagecurl.rc.o +AM_LDFLAGS = $(mwindows) +pagecurl_SOURCES = pagecurl.c +BUILT_SOURCES = pagecurl-icons.c +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + $(GTK_CFLAGS) \ + $(GEGL_CFLAGS) \ + -I$(includedir) + +LDADD = \ + $(libm) \ + $(libgimpui) \ + $(libgimpwidgets) \ + $(libgimpconfig) \ + $(libgimp) \ + $(libgimpcolor) \ + $(libgimpmath) \ + $(libgimpbase) \ + $(GTK_LIBS) \ + $(GEGL_LIBS) \ + $(RT_LIBS) \ + $(INTLLIBS) \ + $(pagecurl_RC) + +PAGECURL_IMAGES = \ + curl0.png \ + curl1.png \ + curl2.png \ + curl3.png \ + curl4.png \ + curl5.png \ + curl6.png \ + curl7.png + +EXTRA_DIST = $(PAGECURL_IMAGES) +CLEANFILES = $(BUILT_SOURCES) pagecurl-icons.gresource.xml +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/build/windows/gimprc-plug-ins.rule $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plug-ins/pagecurl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu plug-ins/pagecurl/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(top_srcdir)/build/windows/gimprc-plug-ins.rule $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libexecPROGRAMS: $(libexec_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(libexecdir)" && rm -f $$files + +clean-libexecPROGRAMS: + @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +pagecurl$(EXEEXT): $(pagecurl_OBJECTS) $(pagecurl_DEPENDENCIES) $(EXTRA_pagecurl_DEPENDENCIES) + @rm -f pagecurl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pagecurl_OBJECTS) $(pagecurl_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pagecurl.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(libexecdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/pagecurl.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libexecPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/pagecurl.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libexecPROGRAMS + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libexecPROGRAMS clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libexecPROGRAMS \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-libexecPROGRAMS + +.PRECIOUS: Makefile + + +# `windres` seems a very stupid tool and it breaks with double shlashes +# in parameter paths. Strengthen the rule a little. +@HAVE_WINDRES_TRUE@%.rc.o: +@HAVE_WINDRES_TRUE@ $(WINDRES) --define ORIGINALFILENAME_STR="$*$(EXEEXT)" \ +@HAVE_WINDRES_TRUE@ --define INTERNALNAME_STR="$*" \ +@HAVE_WINDRES_TRUE@ --define TOP_SRCDIR="`echo $(top_srcdir) | sed 's*//*/*'`" \ +@HAVE_WINDRES_TRUE@ -I"`echo $(top_srcdir)/app | sed 's%/\+%/%'`" \ +@HAVE_WINDRES_TRUE@ -I"`echo $(top_builddir)/app | sed 's%/\+%/%'`"\ +@HAVE_WINDRES_TRUE@ -I"`echo $(top_builddir) | sed 's%/\+%/%'`"\ +@HAVE_WINDRES_TRUE@ $(GIMPPLUGINRC) $@ + +pagecurl-icons.gresource.xml: $(PAGECURL_IMAGES) Makefile.am + $(AM_V_GEN) ( rm -f $@; \ + echo '<?xml version="1.0" encoding="UTF-8"?>' > $@; \ + echo '<gresources>' >> $@; \ + echo ' <gresource prefix="/org/gimp/pagecurl-icons">' >> $@; \ + for image in $(PAGECURL_IMAGES); do \ + echo " <file preprocess=\"to-pixdata\">$$image</file>" >> $@; \ + done; \ + echo ' </gresource>' >> $@; \ + echo '</gresources>' >> $@ ) + +pagecurl-icons.c: pagecurl-icons.gresource.xml + $(AM_V_GEN) $(HOST_GLIB_COMPILE_RESOURCES) \ + --sourcedir=$(srcdir) --generate-source \ + --target=$@ pagecurl-icons.gresource.xml + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/plug-ins/pagecurl/curl0.png b/plug-ins/pagecurl/curl0.png Binary files differnew file mode 100644 index 0000000..f136c61 --- /dev/null +++ b/plug-ins/pagecurl/curl0.png diff --git a/plug-ins/pagecurl/curl1.png b/plug-ins/pagecurl/curl1.png Binary files differnew file mode 100644 index 0000000..d54f7e6 --- /dev/null +++ b/plug-ins/pagecurl/curl1.png diff --git a/plug-ins/pagecurl/curl2.png b/plug-ins/pagecurl/curl2.png Binary files differnew file mode 100644 index 0000000..0553acb --- /dev/null +++ b/plug-ins/pagecurl/curl2.png diff --git a/plug-ins/pagecurl/curl3.png b/plug-ins/pagecurl/curl3.png Binary files differnew file mode 100644 index 0000000..f4d94a7 --- /dev/null +++ b/plug-ins/pagecurl/curl3.png diff --git a/plug-ins/pagecurl/curl4.png b/plug-ins/pagecurl/curl4.png Binary files differnew file mode 100644 index 0000000..0a5413c --- /dev/null +++ b/plug-ins/pagecurl/curl4.png diff --git a/plug-ins/pagecurl/curl5.png b/plug-ins/pagecurl/curl5.png Binary files differnew file mode 100644 index 0000000..30d3232 --- /dev/null +++ b/plug-ins/pagecurl/curl5.png diff --git a/plug-ins/pagecurl/curl6.png b/plug-ins/pagecurl/curl6.png Binary files differnew file mode 100644 index 0000000..bed61cb --- /dev/null +++ b/plug-ins/pagecurl/curl6.png diff --git a/plug-ins/pagecurl/curl7.png b/plug-ins/pagecurl/curl7.png Binary files differnew file mode 100644 index 0000000..12dae05 --- /dev/null +++ b/plug-ins/pagecurl/curl7.png diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c new file mode 100644 index 0000000..c82dc8a --- /dev/null +++ b/plug-ins/pagecurl/pagecurl.c @@ -0,0 +1,1028 @@ +/* Page Curl 0.9 --- image filter plug-in for GIMP + * Copyright (C) 1996 Federico Mena Quintero + * Ported to Gimp 1.0 1998 by Simon Budig <Simon.Budig@unix-ag.org> + * + * You can contact me at quartic@polloux.fciencias.unam.mx + * You can contact the original GIMP authors at gimp@xcf.berkeley.edu + * + * 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/>. + * + */ + +/* + * Ported to the 0.99.x architecture by Simon Budig, Simon.Budig@unix-ag.org + */ + +/* + * Version History + * 0.5: (1996) Version for Gimp 0.54 by Federico Mena Quintero + * 0.6: (Feb '98) First Version for Gimp 0.99.x, very buggy. + * 0.8: (Mar '98) First "stable" version + * 0.9: (May '98) + * - Added support for Gradients. It is now possible to map + * a gradient to the back of the curl. + * - This implies a changed PDB-Interface: New "mode" parameter. + * - Pagecurl now returns the ID of the new layer. + * - Exchanged the meaning of FG/BG Color, because mostly the FG + * color is darker. + * 1.0: (July '04) + * - Code cleanup, added reverse gradient option. + */ +#include "config.h" + +#include <libgimp/gimp.h> +#include <libgimp/gimpui.h> + +#include "libgimp/stdplugins-intl.h" + +#include "pagecurl-icons.c" + + +#define PLUG_IN_PROC "plug-in-pagecurl" +#define PLUG_IN_BINARY "pagecurl" +#define PLUG_IN_ROLE "gimp-pagecurl" +#define PLUG_IN_VERSION "July 2004, 1.0" +#define NGRADSAMPLES 256 + + +typedef enum +{ + CURL_COLORS_FG_BG, + CURL_COLORS_GRADIENT, + CURL_COLORS_GRADIENT_REVERSE, + CURL_COLORS_LAST = CURL_COLORS_GRADIENT_REVERSE +} CurlColors; + +typedef enum +{ + CURL_ORIENTATION_VERTICAL, + CURL_ORIENTATION_HORIZONTAL, + CURL_ORIENTATION_LAST = CURL_ORIENTATION_HORIZONTAL +} CurlOrientation; + +typedef enum +{ + CURL_EDGE_LOWER_RIGHT = 1, + CURL_EDGE_LOWER_LEFT = 2, + CURL_EDGE_UPPER_LEFT = 3, + CURL_EDGE_UPPER_RIGHT = 4, + CURL_EDGE_FIRST = CURL_EDGE_LOWER_RIGHT, + CURL_EDGE_LAST = CURL_EDGE_UPPER_RIGHT +} CurlEdge; + + +#define CURL_EDGE_LEFT(e) ((e) == CURL_EDGE_LOWER_LEFT || \ + (e) == CURL_EDGE_UPPER_LEFT) +#define CURL_EDGE_RIGHT(e) ((e) == CURL_EDGE_LOWER_RIGHT || \ + (e) == CURL_EDGE_UPPER_RIGHT) +#define CURL_EDGE_LOWER(e) ((e) == CURL_EDGE_LOWER_RIGHT || \ + (e) == CURL_EDGE_LOWER_LEFT) +#define CURL_EDGE_UPPER(e) ((e) == CURL_EDGE_UPPER_LEFT || \ + (e) == CURL_EDGE_UPPER_RIGHT) + + +/***** Types *****/ + +typedef struct +{ + CurlColors colors; + gdouble opacity; + gboolean shade; + CurlEdge edge; + CurlOrientation orientation; +} CurlParams; + + +/***** Prototypes *****/ + +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); +static void set_default_params (void); + +static void dialog_scale_update (GtkAdjustment *adjustment, + gdouble *value); + +static gboolean dialog (void); + +static void init_calculation (gint32 drawable_id); +static gint32 do_curl_effect (gint32 drawable_id); +static void clear_curled_region (gint32 drawable_id); +static gint32 page_curl (gint32 drawable_id); +static GimpRGB * get_gradient_samples (gint32 drawable_id, + gboolean reverse); + + +/***** Variables *****/ + +const GimpPlugInInfo PLUG_IN_INFO = +{ + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query_proc */ + run /* run_proc */ +}; + +static CurlParams curl; + +/* Image parameters */ + +static gint32 image_id; + +static GtkWidget *curl_image = NULL; + +static gint sel_x, sel_y; +static gint true_sel_width, true_sel_height; +static gint sel_width, sel_height; +static gint drawable_position; + +/* Center and radius of circle */ + +static GimpVector2 center; +static double radius; + +/* Useful points to keep around */ + +static GimpVector2 left_tangent; +static GimpVector2 right_tangent; + +/* Slopes --- these are *not* in the usual geometric sense! */ + +static gdouble diagl_slope; +static gdouble diagr_slope; +static gdouble diagb_slope; +static gdouble diagm_slope; + +/* User-configured parameters */ + +static GimpRGB fg_color; +static GimpRGB bg_color; + + +/***** Functions *****/ + +MAIN () + +static void +query (void) +{ + static const GimpParamDef args[] = + { + { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, + { GIMP_PDB_IMAGE, "image", "Input image" }, + { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, + { GIMP_PDB_INT32, "colors", "FG- and BG-Color (0), Current gradient (1), Current gradient reversed (2)" }, + { GIMP_PDB_INT32, "edge", + "Edge to curl (1-4, clockwise, starting in the lower right edge)" }, + { GIMP_PDB_INT32, "orientation", "Vertical (0), Horizontal (1)" }, + { GIMP_PDB_INT32, "shade", + "Shade the region under the curl (1) or not (0)" }, + }; + + static const GimpParamDef return_vals[] = + { + { GIMP_PDB_LAYER, "curl-layer", "The new layer with the curl." } + }; + + gimp_install_procedure (PLUG_IN_PROC, + N_("Curl up one of the image corners"), + "This plug-in creates a pagecurl-effect.", + "Federico Mena Quintero and Simon Budig", + "Federico Mena Quintero and Simon Budig", + PLUG_IN_VERSION, + N_("_Pagecurl..."), + "RGB*, GRAY*", + GIMP_PLUGIN, + G_N_ELEMENTS (args), + G_N_ELEMENTS (return_vals), + args, + return_vals); + + gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Distorts"); +} + +static void +run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals) +{ + static GimpParam values[2]; + GimpRunMode run_mode; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + gint32 drawable_id; + + run_mode = param[0].data.d_int32; + + INIT_I18N (); + gegl_init (NULL, NULL); + + set_default_params (); + + /* Possibly retrieve data */ + gimp_get_data (PLUG_IN_PROC, &curl); + + *nreturn_vals = 2; + *return_vals = values; + + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = status; + values[1].type = GIMP_PDB_LAYER; + values[1].data.d_layer = -1; + + /* Get the specified drawable */ + drawable_id = param[2].data.d_drawable; + image_id = param[1].data.d_image; + + if ((gimp_drawable_is_rgb (drawable_id) || + gimp_drawable_is_gray (drawable_id)) && + gimp_drawable_mask_intersect (drawable_id, &sel_x, &sel_y, + &true_sel_width, &true_sel_height)) + { + switch (run_mode) + { + case GIMP_RUN_INTERACTIVE: + /* First acquire information with a dialog */ + if (! dialog ()) + return; + break; + + case GIMP_RUN_NONINTERACTIVE: + /* Make sure all the arguments are there! */ + if (nparams != 7) + status = GIMP_PDB_CALLING_ERROR; + + if (status == GIMP_PDB_SUCCESS) + { + curl.colors = CLAMP (param[3].data.d_int32, + 0, CURL_COLORS_LAST); + curl.edge = CLAMP (param[4].data.d_int32, + CURL_EDGE_FIRST, CURL_EDGE_LAST); + curl.orientation = CLAMP (param[5].data.d_int32, + 0, CURL_ORIENTATION_LAST); + curl.shade = param[6].data.d_int32 ? TRUE : FALSE; + } + break; + + case GIMP_RUN_WITH_LAST_VALS: + break; + + default: + break; + } + + if (status == GIMP_PDB_SUCCESS) + { + values[1].data.d_layer = page_curl (drawable_id); + + if (run_mode != GIMP_RUN_NONINTERACTIVE) + gimp_displays_flush (); + + if (run_mode == GIMP_RUN_INTERACTIVE) + gimp_set_data (PLUG_IN_PROC, &curl, sizeof (CurlParams)); + } + } + else + /* Sorry - no indexed/noalpha images */ + status = GIMP_PDB_EXECUTION_ERROR; + + values[0].data.d_status = status; +} + +/***************************************************** + * Functions to locate the current point in the curl. + * The following functions assume an curl in the + * lower right corner. + * diagb crosses the two tangential points from the + * circle with diagl and diagr. + * + * +------------------------------------------------+ + * | __-- /| + * | __-- _/ | + * | __-- / | + * | __-- _/ | + * | __-- / | + * | __--____ _/ | + * | __----~~ \ _/ | + * | __-- | _/ | + * | diagl __-- _/| _/diagr | + * | __-- diagm_/ |/ | + * | __-- /___/ | + * +-------------------------+----------------------+ + */ + +static inline gboolean +left_of_diagl (gdouble x, + gdouble y) +{ + return (x < (sel_width + (y - sel_height) * diagl_slope)); +} + +static inline gboolean +right_of_diagr (gdouble x, + gdouble y) +{ + return (x > (sel_width + (y - sel_height) * diagr_slope)); +} + +static inline gboolean +below_diagb (gdouble x, + gdouble y) +{ + return (y < (right_tangent.y + (x - right_tangent.x) * diagb_slope)); +} + +static inline gboolean +right_of_diagm (gdouble x, + gdouble y) +{ + return (x > (sel_width + (y - sel_height) * diagm_slope)); +} + +static inline gboolean +inside_circle (gdouble x, + gdouble y) +{ + x -= center.x; + y -= center.y; + + return x * x + y * y <= radius * radius; +} + +static void +set_default_params (void) +{ + curl.colors = CURL_COLORS_FG_BG; + curl.opacity = 1.0; + curl.shade = TRUE; + curl.edge = CURL_EDGE_LOWER_RIGHT; + curl.orientation = CURL_ORIENTATION_VERTICAL; +} + +/********************************************************************/ +/* dialog callbacks */ +/********************************************************************/ + +static void +dialog_scale_update (GtkAdjustment *adjustment, + gdouble *value) +{ + *value = ((gdouble) gtk_adjustment_get_value (adjustment)) / 100.0; +} + +static void +curl_pixbuf_update (void) +{ + GdkPixbuf *pixbuf; + gint index; + gchar *resource; + + switch (curl.edge) + { + case CURL_EDGE_LOWER_RIGHT: index = 0; break; + case CURL_EDGE_LOWER_LEFT: index = 1; break; + case CURL_EDGE_UPPER_RIGHT: index = 2; break; + case CURL_EDGE_UPPER_LEFT: index = 3; break; + default: + return; + } + + index += curl.orientation * 4; + + resource = g_strdup_printf ("/org/gimp/pagecurl-icons/curl%c.png", + '0' + index); + pixbuf = gdk_pixbuf_new_from_resource (resource, NULL); + g_free (resource); + + gtk_image_set_from_pixbuf (GTK_IMAGE (curl_image), pixbuf); + g_object_unref (pixbuf); +} + +static gboolean +dialog (void) +{ + /* Missing options: Color-dialogs? / own curl layer ? / transparency + to original drawable / Warp-curl (unsupported yet) */ + + GtkWidget *dialog; + GtkWidget *hbox; + GtkWidget *vbox; + GtkWidget *table; + GtkWidget *frame; + GtkWidget *button; + GtkWidget *combo; + GtkObject *adjustment; + gboolean run; + + gimp_ui_init (PLUG_IN_BINARY, FALSE); + + dialog = gimp_dialog_new (_("Pagecurl Effect"), PLUG_IN_ROLE, + NULL, 0, + gimp_standard_help_func, PLUG_IN_PROC, + + _("_Cancel"), GTK_RESPONSE_CANCEL, + _("_OK"), GTK_RESPONSE_OK, + + NULL); + + gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + GTK_RESPONSE_CANCEL, + -1); + + gimp_window_set_transient (GTK_WINDOW (dialog)); + + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 12); + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), + vbox, TRUE, TRUE, 0); + gtk_widget_show (vbox); + + frame = gimp_frame_new (_("Curl Location")); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + + table = gtk_table_new (3, 2, TRUE); + gtk_table_set_col_spacings (GTK_TABLE (table), 6); + gtk_table_set_row_spacings (GTK_TABLE (table), 6); + gtk_container_add (GTK_CONTAINER (frame), table); + + curl_image = gtk_image_new (); + + gtk_table_attach (GTK_TABLE (table), curl_image, 0, 2, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + gtk_widget_show (curl_image); + + curl_pixbuf_update (); + + { + static const gchar *name[] = + { + N_("Lower right"), + N_("Lower left"), + N_("Upper left"), + N_("Upper right") + }; + gint i; + + button = NULL; + for (i = CURL_EDGE_FIRST; i <= CURL_EDGE_LAST; i++) + { + button = + gtk_radio_button_new_with_label (button == NULL ? + NULL : + gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)), + gettext (name[i - CURL_EDGE_FIRST])); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), + curl.edge == i); + + g_object_set_data (G_OBJECT (button), + "gimp-item-data", GINT_TO_POINTER (i)); + + gtk_table_attach (GTK_TABLE (table), button, + CURL_EDGE_LEFT (i) ? 0 : 1, + CURL_EDGE_LEFT (i) ? 1 : 2, + CURL_EDGE_UPPER (i) ? 0 : 2, + CURL_EDGE_UPPER (i) ? 1 : 3, + GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0); + gtk_widget_show (button); + + g_signal_connect (button, "toggled", + G_CALLBACK (gimp_radio_button_update), + &curl.edge); + + g_signal_connect (button, "toggled", + G_CALLBACK (curl_pixbuf_update), + NULL); + } + } + + gtk_widget_show (table); + gtk_widget_show (frame); + + frame = gimp_frame_new (_("Curl Orientation")); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE); + gtk_container_add (GTK_CONTAINER (frame), hbox); + + { + static const gchar *name[] = + { + N_("_Vertical"), + N_("_Horizontal") + }; + gint i; + + button = NULL; + for (i = 0; i <= CURL_ORIENTATION_LAST; i++) + { + button = gtk_radio_button_new_with_mnemonic (button == NULL ? + NULL : + gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)), + gettext (name[i])); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), + curl.orientation == i); + + g_object_set_data (G_OBJECT (button), + "gimp-item-data", GINT_TO_POINTER (i)); + + gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0); + gtk_widget_show (button); + + g_signal_connect (button, "toggled", + G_CALLBACK (gimp_radio_button_update), + &curl.orientation); + + g_signal_connect (button, "toggled", + G_CALLBACK (curl_pixbuf_update), + NULL); + } + } + + gtk_widget_show (hbox); + gtk_widget_show (frame); + + button = gtk_check_button_new_with_mnemonic (_("_Shade under curl")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), curl.shade); + gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_widget_show (button); + + g_signal_connect (button, "toggled", + G_CALLBACK (gimp_toggle_button_update), + &curl.shade); + + combo = g_object_new (GIMP_TYPE_INT_COMBO_BOX, NULL); + + gimp_int_combo_box_prepend (GIMP_INT_COMBO_BOX (combo), + GIMP_INT_STORE_VALUE, CURL_COLORS_GRADIENT_REVERSE, + GIMP_INT_STORE_LABEL, _("Current gradient (reversed)"), + GIMP_INT_STORE_ICON_NAME, GIMP_ICON_GRADIENT, + -1); + gimp_int_combo_box_prepend (GIMP_INT_COMBO_BOX (combo), + GIMP_INT_STORE_VALUE, CURL_COLORS_GRADIENT, + GIMP_INT_STORE_LABEL, _("Current gradient"), + GIMP_INT_STORE_ICON_NAME, GIMP_ICON_GRADIENT, + -1); + gimp_int_combo_box_prepend (GIMP_INT_COMBO_BOX (combo), + GIMP_INT_STORE_VALUE, CURL_COLORS_FG_BG, + GIMP_INT_STORE_LABEL, _("Foreground / background colors"), + GIMP_INT_STORE_ICON_NAME, GIMP_ICON_COLORS_DEFAULT, + -1); + + gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0); + gtk_widget_show (combo); + + gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo), + curl.colors, + G_CALLBACK (gimp_int_combo_box_get_active), + &curl.colors); + + gtk_widget_show (dialog); + + table = gtk_table_new (1, 3, FALSE); + gtk_table_set_col_spacings (GTK_TABLE (table), 6); + gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); + gtk_widget_show (table); + + adjustment = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, + _("_Opacity:"), 100, 0, + curl.opacity * 100.0, 0.0, 100.0, + 1.0, 1.0, 0.0, + TRUE, 0, 0, + NULL, NULL); + g_signal_connect (adjustment, "value-changed", + G_CALLBACK (dialog_scale_update), + &curl.opacity); + + run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK); + + gtk_widget_destroy (dialog); + + return run; +} + +static void +init_calculation (gint32 drawable_id) +{ + gdouble k; + gdouble alpha, beta; + gdouble angle; + GimpVector2 v1, v2; + gint32 *image_layers; + gint32 nlayers; + + gimp_layer_add_alpha (drawable_id); + + /* Image parameters */ + + /* Determine Position of original Layer in the Layer stack. */ + + image_layers = gimp_image_get_layers (image_id, &nlayers); + drawable_position = 0; + while (drawable_position < nlayers && + image_layers[drawable_position] != drawable_id) + drawable_position++; + + switch (curl.orientation) + { + case CURL_ORIENTATION_VERTICAL: + sel_width = true_sel_width; + sel_height = true_sel_height; + break; + + case CURL_ORIENTATION_HORIZONTAL: + sel_width = true_sel_height; + sel_height = true_sel_width; + break; + } + + /* Circle parameters */ + + alpha = atan ((double) sel_height / sel_width); + beta = alpha / 2.0; + k = sel_width / ((G_PI + alpha) * sin (beta) + cos (beta)); + gimp_vector2_set (¢er, k * cos (beta), k * sin (beta)); + radius = center.y; + + /* left_tangent */ + + gimp_vector2_set (&left_tangent, radius * -sin (alpha), radius * cos (alpha)); + gimp_vector2_add (&left_tangent, &left_tangent, ¢er); + + /* right_tangent */ + + gimp_vector2_sub (&v1, &left_tangent, ¢er); + gimp_vector2_set (&v2, sel_width - center.x, sel_height - center.y); + angle = -2.0 * acos (gimp_vector2_inner_product (&v1, &v2) / + (gimp_vector2_length (&v1) * + gimp_vector2_length (&v2))); + gimp_vector2_set (&right_tangent, + v1.x * cos (angle) + v1.y * -sin (angle), + v1.x * sin (angle) + v1.y * cos (angle)); + gimp_vector2_add (&right_tangent, &right_tangent, ¢er); + + /* Slopes */ + + diagl_slope = (double) sel_width / sel_height; + diagr_slope = (sel_width - right_tangent.x) / (sel_height - right_tangent.y); + diagb_slope = ((right_tangent.y - left_tangent.y) / + (right_tangent.x - left_tangent.x)); + diagm_slope = (sel_width - center.x) / sel_height; + + /* Colors */ + + gimp_context_get_foreground (&fg_color); + gimp_context_get_background (&bg_color); +} + +static gint32 +do_curl_effect (gint32 drawable_id) +{ + gint x = 0; + gint y = 0; + gboolean color_image; + gint x1, y1; + guint progress, max_progress; + gdouble intensity, alpha; + GimpVector2 v, dl, dr; + gdouble dl_mag, dr_mag, angle, factor; + GeglBuffer *curl_buffer; + gint32 curl_layer_id; + GimpRGB *grad_samples = NULL; + gint width, height, n_ch; + GeglRectangle *roi; + GeglBufferIterator *iter; + const Babl *format; + + color_image = gimp_drawable_is_rgb (drawable_id); + + curl_layer_id = gimp_layer_new (image_id, + _("Curl Layer"), + true_sel_width, + true_sel_height, + color_image ? + GIMP_RGBA_IMAGE : GIMP_GRAYA_IMAGE, + 100, + gimp_image_get_default_new_layer_mode (image_id)); + + gimp_image_insert_layer (image_id, curl_layer_id, + gimp_item_get_parent (drawable_id), + drawable_position); + gimp_drawable_fill (curl_layer_id, GIMP_FILL_TRANSPARENT); + + gimp_drawable_offsets (drawable_id, &x1, &y1); + gimp_layer_set_offsets (curl_layer_id, sel_x + x1, sel_y + y1); + + curl_buffer = gimp_drawable_get_shadow_buffer (curl_layer_id); + + width = gegl_buffer_get_width (curl_buffer); + height = gegl_buffer_get_height (curl_buffer); + format = babl_format ("R'G'B'A float"); + n_ch = babl_format_get_n_components (format); + + iter = gegl_buffer_iterator_new (curl_buffer, + GEGL_RECTANGLE (0, 0, width, height), 0, + format, + GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1); + + /* Init shade_under */ + gimp_vector2_set (&dl, -sel_width, -sel_height); + dl_mag = gimp_vector2_length (&dl); + gimp_vector2_set (&dr, + -(sel_width - right_tangent.x), + -(sel_height - right_tangent.y)); + dr_mag = gimp_vector2_length (&dr); + alpha = acos (gimp_vector2_inner_product (&dl, &dr) / (dl_mag * dr_mag)); + + /* Gradient Samples */ + switch (curl.colors) + { + case CURL_COLORS_FG_BG: + break; + case CURL_COLORS_GRADIENT: + grad_samples = get_gradient_samples (curl_layer_id, FALSE); + break; + case CURL_COLORS_GRADIENT_REVERSE: + grad_samples = get_gradient_samples (curl_layer_id, TRUE); + break; + } + + max_progress = 2 * sel_width * sel_height; + progress = 0; + + /* Main loop */ + while (gegl_buffer_iterator_next (iter)) + { + gfloat *dest; + + roi = &iter->items[0].roi; + dest = (gfloat *) iter->items[0].data; + + for (y1 = roi->y; y1 < roi->y + roi->height; y1++) + { + GimpRGB color; + + for (x1 = roi->x; x1 < roi->x + roi->width; x1++) + { + /* Map coordinates to get the curl correct... */ + switch (curl.orientation) + { + case CURL_ORIENTATION_VERTICAL: + x = CURL_EDGE_RIGHT (curl.edge) ? x1 : sel_width - 1 - x1; + y = CURL_EDGE_UPPER (curl.edge) ? y1 : sel_height - 1 - y1; + break; + + case CURL_ORIENTATION_HORIZONTAL: + x = CURL_EDGE_LOWER (curl.edge) ? y1 : sel_width - 1 - y1; + y = CURL_EDGE_LEFT (curl.edge) ? x1 : sel_height - 1 - x1; + break; + } + + if (left_of_diagl (x, y)) + { /* uncurled region: transparent black */ + gimp_rgba_set (&color, 0, 0, 0, 0); + } + else if (right_of_diagr (x, y) || + (right_of_diagm (x, y) && + below_diagb (x, y) && + !inside_circle (x, y))) + { + /* curled region: transparent black */ + gimp_rgba_set (&color, 0, 0, 0, 0); + } + else + { + v.x = -(sel_width - x); + v.y = -(sel_height - y); + angle = acos (gimp_vector2_inner_product (&v, &dl) / + (gimp_vector2_length (&v) * dl_mag)); + + if (inside_circle (x, y) || below_diagb (x, y)) + { + /* Below the curl. */ + factor = angle / alpha; + gimp_rgba_set (&color, 0, 0, 0, curl.shade ? factor : 0); + } + else + { + GimpRGB *gradrgb; + + /* On the curl */ + switch (curl.colors) + { + case CURL_COLORS_FG_BG: + intensity = pow (sin (G_PI * angle / alpha), 1.5); + gimp_rgba_set (&color, + intensity * bg_color.r + (1.0 - intensity) * fg_color.r, + intensity * bg_color.g + (1.0 - intensity) * fg_color.g, + intensity * bg_color.b + (1.0 - intensity) * fg_color.b, + (1.0 - intensity * (1.0 - curl.opacity))); + break; + + case CURL_COLORS_GRADIENT: + case CURL_COLORS_GRADIENT_REVERSE: + /* Calculate position in Gradient */ + intensity = (angle/alpha) + sin (G_PI*2 * angle/alpha) * 0.075; + + gradrgb = grad_samples + ((guint) (intensity * NGRADSAMPLES)); + + /* Check boundaries */ + intensity = CLAMP (intensity, 0.0, 1.0); + color = *gradrgb; + color.a = gradrgb->a * (1.0 - intensity * (1.0 - curl.opacity)); + break; + } + } + } + + dest[0] = color.r; + dest[1] = color.g; + dest[2] = color.b; + dest[3] = color.a; + + dest += n_ch; + } + } + progress += roi->width * roi->height; + gimp_progress_update ((double) progress / (double) max_progress); + } + + gimp_progress_update (0.5); + gegl_buffer_flush (curl_buffer); + gimp_drawable_merge_shadow (curl_layer_id, FALSE); + gimp_drawable_update (curl_layer_id, 0, 0, width, height); + + g_free (grad_samples); + + return curl_layer_id; +} + +/************************************************/ + +static void +clear_curled_region (gint32 drawable_id) +{ + gint x = 0; + gint y = 0; + guint x1, y1; + gfloat *dest, *src; + guint progress, max_progress; + GeglBuffer *buf; + GeglBuffer *shadow_buf; + GeglRectangle *roi; + GeglBufferIterator *iter; + const Babl *format; + gint width, height, bpp, n_ch; + gint buf_index; + + max_progress = 2 * sel_width * sel_height; + progress = max_progress / 2; + + buf = gimp_drawable_get_buffer (drawable_id); + shadow_buf = gimp_drawable_get_shadow_buffer (drawable_id); + width = gegl_buffer_get_width (buf); + height = gegl_buffer_get_height (buf); + + format = babl_format ("R'G'B'A float"); + bpp = babl_format_get_bytes_per_pixel (format); + n_ch = babl_format_get_n_components (format); + + iter = gegl_buffer_iterator_new (shadow_buf, + GEGL_RECTANGLE (0, 0, width, height), 0, + format, + GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 2); + buf_index = gegl_buffer_iterator_add (iter, buf, NULL, 0, + format, + GEGL_ACCESS_READ, GEGL_ABYSS_NONE); + + while (gegl_buffer_iterator_next (iter)) + { + roi = &iter->items[0].roi; + dest = iter->items[0].data; + src = iter->items[buf_index].data; + + memcpy (dest, src, roi->width * roi->height * bpp); + + for (y1 = roi->y; y1 < roi->y + roi->height; y1++) + { + for (x1 = roi->x; x1 < roi->x + roi->width; x1++) + { + /* Map coordinates to get the curl correct... */ + switch (curl.orientation) + { + case CURL_ORIENTATION_VERTICAL: + x = (CURL_EDGE_RIGHT (curl.edge) ? + x1 - sel_x : sel_width - 1 - (x1 - sel_x)); + y = (CURL_EDGE_UPPER (curl.edge) ? + y1 - sel_y : sel_height - 1 - (y1 - sel_y)); + break; + + case CURL_ORIENTATION_HORIZONTAL: + x = (CURL_EDGE_LOWER (curl.edge) ? + y1 - sel_y : sel_width - 1 - (y1 - sel_y)); + y = (CURL_EDGE_LEFT (curl.edge) ? + x1 - sel_x : sel_height - 1 - (x1 - sel_x)); + break; + } + + if (right_of_diagr (x, y) || + (right_of_diagm (x, y) && + below_diagb (x, y) && + !inside_circle (x, y))) + { + /* Right of the curl: Alpha = 0 */ + dest[0] = src[0]; + dest[1] = src[1]; + dest[2] = src[2]; + dest[3] = 0.0; + } + + dest += n_ch; + src += n_ch; + } + } + + progress += roi->width * roi->height; + gimp_progress_update ((double) progress / (double) max_progress); + } + + gimp_progress_update (1.0); + gegl_buffer_flush (shadow_buf); + gimp_drawable_merge_shadow (drawable_id, TRUE); + gimp_drawable_update (drawable_id, + sel_x, sel_y, + true_sel_width, true_sel_height); +} + +static gint32 +page_curl (gint32 drawable_id) +{ + gint curl_layer_id; + + gimp_image_undo_group_start (image_id); + + gimp_progress_init (_("Page Curl")); + + init_calculation (drawable_id); + + curl_layer_id = do_curl_effect (drawable_id); + + clear_curled_region (drawable_id); + + gimp_image_undo_group_end (image_id); + + return curl_layer_id; +} + +/* + Returns NGRADSAMPLES samples of active gradient. + Each sample has (gimp_drawable_bpp (drawable_id)) bytes. + "ripped" from gradmap.c. + */ +static GimpRGB * +get_gradient_samples (gint32 drawable_id, + gboolean reverse) +{ + gchar *gradient_name; + gint n_d_samples; + gdouble *d_samples = NULL; + GimpRGB *rgba; + gint i; + + gradient_name = gimp_context_get_gradient (); + + gimp_gradient_get_uniform_samples (gradient_name, NGRADSAMPLES, reverse, + &n_d_samples, &d_samples); + + rgba = g_new0 (GimpRGB, NGRADSAMPLES); + for (i = 0; i < NGRADSAMPLES; i++) + { + gimp_rgba_set (rgba + i, + d_samples[i*4 + 0], + d_samples[i*4 + 1], + d_samples[i*4 + 2], + d_samples[i*4 + 3]); + } + + g_free (gradient_name); + + return rgba; +} |