mirror of https://github.com/GNOME/gimp.git
Merged from trunk revisions 26631:27242.
svn path=/branches/soc-2008-tagging/; revision=27244
This commit is contained in:
parent
46860b5daa
commit
b850b40bbb
23
AUTHORS
23
AUTHORS
|
@ -14,6 +14,7 @@ The following people have contributed code to GIMP:
|
|||
Henrik Brix Andersen
|
||||
Karl-Johan Andersson
|
||||
Nicola Archibald
|
||||
Luis Barrancos
|
||||
John Beale
|
||||
Zach Beane
|
||||
Tom Bech
|
||||
|
@ -35,6 +36,7 @@ The following people have contributed code to GIMP:
|
|||
Winston Chang
|
||||
Stephane Chauveau
|
||||
Zbigniew Chyla
|
||||
Lars-Peter Clausen
|
||||
Branko Collin
|
||||
Ed Connel
|
||||
Piers Cornwell
|
||||
|
@ -42,6 +44,8 @@ The following people have contributed code to GIMP:
|
|||
Daniel Cotting
|
||||
Jay Cox
|
||||
Kevin Cozens
|
||||
Michael Deal
|
||||
Alexia Death
|
||||
Brian Degenhardt
|
||||
Karine Delvare
|
||||
Andreas Dilger
|
||||
|
@ -49,7 +53,9 @@ The following people have contributed code to GIMP:
|
|||
Scott Draves
|
||||
Daniel Dunbar
|
||||
Misha Dynin
|
||||
Daniel Eddeland
|
||||
Daniel Egger
|
||||
Ulf-D. Ehlert
|
||||
Morton Eriksen
|
||||
Larry Ewing
|
||||
Pedro Alonso Ferrer
|
||||
|
@ -76,6 +82,7 @@ The following people have contributed code to GIMP:
|
|||
Pavel Grinfeld
|
||||
Dov Grobgeld
|
||||
Michael Hammel
|
||||
Marcus Heese
|
||||
Robert Helgesson
|
||||
James Henstridge
|
||||
Eric Hernes
|
||||
|
@ -83,7 +90,9 @@ The following people have contributed code to GIMP:
|
|||
Christoph Hoegl
|
||||
Wolfgang Hofer
|
||||
Alan Horkan
|
||||
Daniel Hornung
|
||||
Jan Hubička
|
||||
Barak Itkin
|
||||
Ben Jackson
|
||||
Tim Janik
|
||||
Kristian Jantz
|
||||
|
@ -106,6 +115,7 @@ The following people have contributed code to GIMP:
|
|||
Marco Lamberto
|
||||
Jens Lautenbacher
|
||||
Laramie Leavitt
|
||||
Tom Lechner
|
||||
Elliot Lee
|
||||
Marc Lehmann
|
||||
Ray Lehtiniemi
|
||||
|
@ -119,6 +129,7 @@ The following people have contributed code to GIMP:
|
|||
Josh MacDonald
|
||||
Ed Mackey
|
||||
Vidar Madsen
|
||||
Luidnel Maignan
|
||||
Ian Main
|
||||
Kjartan Maraas
|
||||
John Marshall
|
||||
|
@ -162,6 +173,7 @@ The following people have contributed code to GIMP:
|
|||
Nils Philippsen
|
||||
Ari Pollak
|
||||
Raphaël Quinet
|
||||
Dennis Ranke
|
||||
Tom Rathborne
|
||||
Jens Restemeier
|
||||
Maurits Rijk
|
||||
|
@ -218,9 +230,12 @@ The following people have contributed art to GIMP:
|
|||
|
||||
Lapo Calamandrei
|
||||
Paul Davey
|
||||
Alexia Death
|
||||
Aurore Derriennic
|
||||
Tuomas Kuosmanen
|
||||
Karl La Rocca
|
||||
Andreas Nilsson
|
||||
Ville Pätsi
|
||||
Mike Schaeffer
|
||||
Carol Spears
|
||||
Jakub Steiner
|
||||
|
@ -229,6 +244,8 @@ The following people have contributed art to GIMP:
|
|||
|
||||
The following people have helped to document GIMP:
|
||||
|
||||
Ignacio AntI
|
||||
Žygimantas Beručka
|
||||
Carey Bunks
|
||||
Marco Ciampa
|
||||
Dust
|
||||
|
@ -243,9 +260,15 @@ The following people have helped to document GIMP:
|
|||
Semka Kuloviæ-Debals
|
||||
Karin Kylander
|
||||
Olof S Kylander
|
||||
Jean-Pierre Litzler
|
||||
Vitaly Lomov
|
||||
Ed Mackey
|
||||
Ian Main
|
||||
Pierre Perrier
|
||||
Alexandre Prokoudine
|
||||
Manuel Quiñones
|
||||
James Robinson
|
||||
Nickolay V. Shmyrev
|
||||
Patrycja Stawiarska
|
||||
Kolbjørn Stuestøl
|
||||
Axel Wernicke
|
||||
|
|
File diff suppressed because it is too large
Load Diff
69
INSTALL
69
INSTALL
|
@ -1,17 +1,19 @@
|
|||
Installation instructions for GIMP 2.5
|
||||
--------------------------------------
|
||||
Installation instructions for GIMP 2.6
|
||||
--------------------------------------
|
||||
|
||||
There are some basic steps to building and installing GIMP.
|
||||
|
||||
GIMP 2.5 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.5. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.5, you have to
|
||||
GIMP 2.6 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.6. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.6, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path.
|
||||
|
||||
GIMP 2.x is fully backward compatible to GIMP 2.0. Plug-ins and
|
||||
scripts written for GIMP 2.0 will continue to work and don't need to
|
||||
be changed nor recompiled to be used with GIMP 2.x.
|
||||
GIMP 2.6 is fully backward compatible to all earlier GIMP 2.x version.
|
||||
Plug-ins and scripts written for GIMP 2.4, or GIMP 2.2 or even 2.0,
|
||||
will continue to work and don't need to be changed nor recompiled to
|
||||
be used with GIMP 2.x.
|
||||
|
||||
The most important part is to make sure the requirements for a build
|
||||
are fulfilled. We depend on a number of tools and libraries which are
|
||||
|
@ -39,7 +41,7 @@ header files installed.
|
|||
http://svn.gnome.org/svn/babl/trunk
|
||||
http://svn.gnome.org/svn/gegl/trunk
|
||||
|
||||
4. You need to have installed GTK+ version 2.12.1 or newer. GIMP
|
||||
4. You need to have installed GTK+ version 2.12.5 or newer. GIMP
|
||||
also need a recent versions of GLib (>= 2.16.1) and Pango (>= 1.18.0).
|
||||
Sources for these can be grabbed from ftp://ftp.gtk.org/.
|
||||
|
||||
|
@ -57,27 +59,35 @@ header files installed.
|
|||
7. We use dbus-glib if available. Grab it from
|
||||
http://dbus.freedesktop.org/releases/dbus-glib/
|
||||
|
||||
8. You may want to install other third party libraries or programs
|
||||
8. Access of remote files is implemented in the URI plug-in. There
|
||||
are several possible implementations for this. The implementation
|
||||
used is determined when you configure GIMP. By default the
|
||||
GIO/GVfs backend is used. If you don't have GVfs support on your
|
||||
target platform, you should pass the '--without-gvfs' option to
|
||||
configure. The configure script will then try to detect another
|
||||
method for accessing remote files.
|
||||
|
||||
9. You may want to install other third party libraries or programs
|
||||
that are needed for some of the available plugins. We recommend
|
||||
to check that the following libraries are installed: lcms,
|
||||
libpng, libjpeg, libpoppler, libtiff, webkit, libmng, librsvg
|
||||
and libwmf.
|
||||
|
||||
9. The Python extension requires Python development headers to be
|
||||
10. The Python extension requires Python development headers to be
|
||||
present. You will also need PyGTK and the respective development
|
||||
headers.
|
||||
|
||||
10. Configure GIMP by running the `configure' script. You may want
|
||||
11. Configure GIMP by running the `configure' script. You may want
|
||||
to pass some options to it, see below.
|
||||
|
||||
11. Build GIMP by running `make'. The use of GNU make is recommended.
|
||||
12. Build GIMP by running `make'. The use of GNU make is recommended.
|
||||
If you need to tweak the build to make it work with other flavours
|
||||
of make, we'd appreciate if you'd send us a patch with the changes.
|
||||
|
||||
12. Install GIMP by running `make install'. In order to avoid clashes
|
||||
with other versions of GIMP, we install a binary called gimp-2.5.
|
||||
13. Install GIMP by running `make install'. In order to avoid clashes
|
||||
with other versions of GIMP, we install a binary called gimp-2.6.
|
||||
By default there's also a link created so that you can type 'gimp'
|
||||
to start gimp-2.5.
|
||||
to start gimp-2.6.
|
||||
|
||||
Please make sure you don't have any old GTK+-2.x, jpeg, etc. libraries
|
||||
lying around on your system, otherwise configure may fail to find the
|
||||
|
@ -89,8 +99,8 @@ packages are included below. Here is an illustration of commands that
|
|||
might be used to build and install GIMP. The actual configuration,
|
||||
compilation and installation output is not shown.
|
||||
|
||||
% tar xvfz gimp-2.5.x.tar.gz # unpack the sources
|
||||
% cd gimp-2.5.x # change to the toplevel directory
|
||||
% tar xvfz gimp-2.6.x.tar.gz # unpack the sources
|
||||
% cd gimp-2.6.x # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GIMP
|
||||
% make install # install GIMP
|
||||
|
@ -125,8 +135,8 @@ These are:
|
|||
is intended primarily as a convenience for developers.
|
||||
|
||||
--enable-gimpdir=DIR. This option changes the default directory
|
||||
GIMP uses to search for its configuration files from ~/.gimp-2.5
|
||||
(the directory .gimp-2.5 in the users home directory) to DIR.
|
||||
GIMP uses to search for its configuration files from ~/.gimp-2.6
|
||||
(the directory .gimp-2.6 in the users home directory) to DIR.
|
||||
|
||||
--enable-binreloc. When compiled for Linux with this option enabled,
|
||||
GIMP will be binary relocatable. Plug-ins and data files will
|
||||
|
@ -149,11 +159,16 @@ These are:
|
|||
causing any trouble at compile-time, you can build --without-exif.
|
||||
Get libexif from http://www.sourceforge.net/projects/libexif.
|
||||
|
||||
--without-mng, --without-aa. The MNG plug-in needs libmng and
|
||||
configure checks for its presense. If for some reason you don't
|
||||
want to build the MNG plug-in even though the library is installed,
|
||||
use --without-mng to disable it expliticely. The same switch exists
|
||||
for aalib, use --without-aa if you run into problems.
|
||||
--without-aa. The AA plug-in needs libaa and configure checks for
|
||||
its presense. Use --without-aa if you run into problems.
|
||||
|
||||
--without-mng. The MNG plug-in needs libmng and configure checks
|
||||
for its presense. If for some reason you don't want to build the
|
||||
MNG plug-in even though the library is installed, use
|
||||
--without-mng to disable it explicitly.
|
||||
|
||||
--without-wmf. The WMF plug-in needs libwmf2 and configure checks for
|
||||
its presense. Use --without-aa if you run into problems.
|
||||
|
||||
--without-webkit. If for some reason you don't want to build the
|
||||
helpbrowser plug-in, you can use --without-webkit to disable
|
||||
|
@ -224,8 +239,8 @@ These are:
|
|||
if you call configure with --without-desktop-dir.
|
||||
|
||||
--disable-default-binary. Use this option if you don't want to make
|
||||
gimp-2.5 the default gimp installation. Otherwise a link called
|
||||
gimp pointing to the gimp-2.5 executable will be installed.
|
||||
gimp-2.6 the default gimp installation. Otherwise a link called
|
||||
gimp pointing to the gimp-2.6 executable will be installed.
|
||||
|
||||
--disable-gimp-console. Use this option if you don't want the
|
||||
gimp-console binary to be built in addition to the standard binary.
|
||||
|
@ -246,7 +261,7 @@ The `make' command builds several things:
|
|||
- A bunch of public libraries in the directories starting with 'libgimp'.
|
||||
- The plug-in programs in the 'plug-ins' directory.
|
||||
- Some modules in the 'modules' subdirectory.
|
||||
- The main GIMP program 'gimp-2.5' in `app'.
|
||||
- The main GIMP program 'gimp-2.6' in `app'.
|
||||
|
||||
The `make install' commands installs the gimp header files associated
|
||||
with the libgimp libraries, the plug-ins, some data files and the GIMP
|
||||
|
|
|
@ -55,6 +55,7 @@ EXTRA_DIST = \
|
|||
ChangeLog.pre-2-0 \
|
||||
ChangeLog.pre-2-2 \
|
||||
ChangeLog.pre-2-4 \
|
||||
ChangeLog.pre-2-6 \
|
||||
HACKING \
|
||||
INSTALL \
|
||||
LICENSE \
|
||||
|
@ -62,6 +63,7 @@ EXTRA_DIST = \
|
|||
NEWS.pre-2-0 \
|
||||
NEWS.pre-2-2 \
|
||||
NEWS.pre-2-4 \
|
||||
NEWS.pre-2-6 \
|
||||
README \
|
||||
README.i18n \
|
||||
authors.dtd \
|
||||
|
@ -70,8 +72,7 @@ EXTRA_DIST = \
|
|||
config.h.win32 \
|
||||
gimp-zip.in \
|
||||
gimpdefs.msc \
|
||||
makefile.msc \
|
||||
mkinstalldirs
|
||||
makefile.msc
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
|
|
166
NEWS
166
NEWS
|
@ -1,168 +1,4 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This is the unstable development branch of GIMP. Here we are working
|
||||
towards the next stable release, which will be GIMP 2.6.
|
||||
|
||||
|
||||
Changes in GIMP 2.5.2
|
||||
=====================
|
||||
|
||||
- final touches on the combined Freehand/Polygon Select tool
|
||||
- added a dockable dialog for managing Color tool settings
|
||||
- prepared the code for changes in the upcoming GTK+ release
|
||||
- improved popup scale button
|
||||
- mark the center of rectangles/bounding rectangles during moves
|
||||
- added dialog to query for using the online user manual
|
||||
- allow to map dynamics to hardness for the Eraser tool
|
||||
- provide gimp-remote functionality on Windows
|
||||
- disable the build and install of the gimp-remote tool by default
|
||||
- allow to scroll beyond the image borders
|
||||
- added new PDB data type for transferring color arrays
|
||||
- added new PDB function gimp-palette-get-colors
|
||||
- added text search to the Help Browser plug-in
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Manish Singh,
|
||||
Lars-Peter Clausen, Alexia Death, Tor Lillqvist, Róman Joost,
|
||||
Jakub Steiner
|
||||
|
||||
|
||||
Changes in GIMP 2.5.1
|
||||
=====================
|
||||
|
||||
- further improvements to the status bar
|
||||
- made the center point of rectangles snap to the grid and rulers
|
||||
- improved Alpha to Logo filters
|
||||
- better cursor feedback in the Intelligent Scissors tool
|
||||
- rotate JPEG thumbnails according to the EXIF orientation
|
||||
- improved event smoothing for paint tools
|
||||
- prepared PSP plug-in to deal with newer versions of the file format
|
||||
- allow plug-ins to work in parallel on different layers of the same image
|
||||
- pass through GEGL command-line options
|
||||
- added 22 new variations to the Flame plugin
|
||||
- only show operations from relevant categories in the GEGL tool
|
||||
- allow to enter the zoom ratio in the status bar
|
||||
- don't keep the file-chooser dialogs around
|
||||
- ported scan-convert code to Cairo, removing libart dependency
|
||||
- allow the paint velocity to affect brush size, opacity and the like
|
||||
- allow for random variations of the brush size, opacity and the like
|
||||
- renamed Dialogs menu to Windows
|
||||
- keep a list of recently closed docks in the Windows menu
|
||||
- allow to go from Brightness-Contrast to Levels to Curves
|
||||
- improved the handling of color tool settings
|
||||
- merged the new Polygon Selection tool with the Freehand Select tool
|
||||
- allow to lock dockables
|
||||
- made Desaturate into a tool with preview in the image window
|
||||
- ported translation contexts to msgctxt
|
||||
- added GimpRuler widgets, an improved version of GtkRuler
|
||||
- moving the selection mask now commits a pending rectangle selection
|
||||
- added keyboard shortcut for resetting the brush scale (Backslash)
|
||||
- ported the Help Browser plug-in to WebKit
|
||||
- allow to use the online user manual
|
||||
- added new translation (Icelandic)
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Øyvind Kolås,
|
||||
Alexia Death, Ulf-D. Ehlert, Daniel Hornung, Michael Deal, Aurimas Juška,
|
||||
Luis Barrancos
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.0
|
||||
=====================
|
||||
|
||||
Core:
|
||||
|
||||
- improved rectangle tool drawing for narrow mode
|
||||
- ported lots (but not all) drawing code to Cairo
|
||||
- optimized image rendering by using pre-multiplied alpha
|
||||
- use new GLib features such as GRegex
|
||||
- use new GTK+ features such as the new GtkTooltip API
|
||||
- much improved GimpCurve object
|
||||
- cleaner and smaller tool options
|
||||
- enable brush scaling for the Smudge tool
|
||||
- added debugging framework that can be enabled at run-time
|
||||
- depend on GEGL and use it optionally in some color operations
|
||||
- optional GEGL processing for all color tools
|
||||
- add proper settings objects for all color tools
|
||||
- add list of recently used settings to all color tools
|
||||
- added experimental GEGL tool to use arbitrary GEGL operations
|
||||
- event filtering and smoothing for better paint tool performance
|
||||
- added motion constraints in the Move Tool
|
||||
- some operations do not any longer automatically add an alpha channel
|
||||
- some preparation for tagging resource files
|
||||
- cutting a selection doesn't clear the selection any longer
|
||||
- added new polygon select tool
|
||||
- load brushes and other data files recursively (search through subdirs)
|
||||
- started work on language selector for the text tool (unfinished)
|
||||
- allow to set opacity of the transform tool preview
|
||||
- merged toolbox menu into the image menu
|
||||
- always keep an image window around
|
||||
- improved image statusbar
|
||||
- dropped 'documents' in favor of ~/.recently-used.xbel
|
||||
- started to work on text box functionality in the text tool
|
||||
- numerous bug fixes and cleanups
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- dicom: improved handling of 16 bit image data
|
||||
- help: use GIO to access the help index
|
||||
- print: moved Page Setup out of the Print dialog
|
||||
- psd-load: rewritten, cleaner and more features
|
||||
- randomize: added previews
|
||||
- ripple: added a Phase Shift control
|
||||
- screenshot: optionally add the mouse cursor image on an extra layer
|
||||
- uri: use GIO/GVfs where available
|
||||
- whirlpinch: allow a larger range for the whirl angle
|
||||
|
||||
|
||||
Python binding:
|
||||
|
||||
- allow to specify colors using CSS color names
|
||||
- added new method Image.new_layer()
|
||||
|
||||
|
||||
Script-Fu:
|
||||
|
||||
- enforce R5RS syntax for 'let'
|
||||
- improved Frosty Logo script
|
||||
|
||||
|
||||
PDB:
|
||||
|
||||
- added new text layer API
|
||||
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
|
||||
- added procedure to test for existance of a procedure in the PDB
|
||||
- improved error handling for procedures
|
||||
|
||||
|
||||
Libraries:
|
||||
|
||||
- added some Cairo utilities
|
||||
- allow to use markup in tooltips
|
||||
- libgimpthumb doesn't any longer depend on other GIMP libraries
|
||||
|
||||
|
||||
Miscellaneous:
|
||||
|
||||
- use the gimptool program on Unix, too, instead of the gimptool script
|
||||
- create the list of supported MIME types at compile-time
|
||||
- gimp shows library versions when called with '--version --verbose'
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Bill Skaggs,
|
||||
Øyvind Kolås, Manish Singh, Kevin Cozens, Alexia Death, Tor Lillqvist,
|
||||
Marcus Heese, John Marshall, Joao S. O. Bueno, Jakub Steiner,
|
||||
Simon Budig, Tom Lechner, Hans Breuer, ...
|
||||
|
|
|
@ -0,0 +1,254 @@
|
|||
------------------------------
|
||||
GNU Image Manipulation Program
|
||||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This is the unstable development branch of GIMP. Here we are working
|
||||
towards the next stable release, which will be GIMP 2.6.
|
||||
|
||||
|
||||
Changes in GIMP 2.6.0
|
||||
=====================
|
||||
|
||||
- further improved error reporting and parameter checks for some procedures
|
||||
- fixed printing of indexed images (bug #552609)
|
||||
- further code cleanup in Script-Fu extension
|
||||
- improved Brightness->Contrast -> Levels -> Curves parameter conversion
|
||||
- made the font size in the docks configurable in the gtkrc file
|
||||
- renamed File->New submenu to File->Create
|
||||
- moved the "Use GEGL" check-box to the Colors menu
|
||||
- added new scale procedures allowing to specify the interpolation
|
||||
explicitly (bug #486977)
|
||||
- lots of bug fixes
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Simon Budig,
|
||||
Tor Lillqvist, Barak Itkin
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.4
|
||||
=====================
|
||||
|
||||
- improved look and feel of the Navigation dialog and navigation popups
|
||||
- improved positioning of the image in the image window
|
||||
- by default turned off use of GEGL for color operations
|
||||
- moved the "Use GEGL" checkbox to the Debug menu
|
||||
- optimized the new scaling code
|
||||
- various fixes to the Python bindings
|
||||
- added Python bindings for most GIMP widgets to the gimpui module
|
||||
- merged GimpHRuler and GimpVRuler classes into GimpRuler
|
||||
- added Search entry to the Keyboard Shortcuts and Input Controller
|
||||
configuration dialogs
|
||||
- allow to drop images (in addition to URIs) on the empty image window
|
||||
- improved error handling in Script-Fu
|
||||
- merged upstream TinyScheme changes into Script-Fu interpreter
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Tor Lillqvist,
|
||||
Lars-Peter Clausen, Michael Schumacher, Kevin Cozens, Barak Itkin,
|
||||
David Gowers, Dennis Ranke
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.3
|
||||
=====================
|
||||
|
||||
- some fixes for the 64-bit Windows platform
|
||||
- optionally emulate brush dynamics when stroking a path or selection
|
||||
- further work on the scroll-beyond-image-borders feature, improving the
|
||||
behavior of the image display when zooming or when the image size changes
|
||||
- added links to the user manual to the Tips dialog
|
||||
- largely rewritten scaling code improves scaling quality, in particular
|
||||
when scaling down
|
||||
- allow to copy-on-write from the image projection
|
||||
- added "Paste as new layer" to Edit menu
|
||||
- added "New from visible" to the Layer menu allowing to create a new
|
||||
layer from the image projection
|
||||
- added new procedure 'gimp-layer-new-from-visible'.
|
||||
- renamed all file plug-in executables to a have a file prefix
|
||||
- changed the HSV color selector to use the GtkHSV widget
|
||||
- changed the default for the 'trust-dirty-flag' gimprc property
|
||||
- dropped the "Starburst" logo script
|
||||
- improved the behavior of the zoom button in the upper right corner of
|
||||
the image window
|
||||
- allow PDB procedures to pass an error message with their return values
|
||||
- changed all file plug-ins to pass their error messages with the
|
||||
return values instead of raising an error dialog
|
||||
- adapt the display of the pointer position in the statusbar to the
|
||||
pointer precision of the active tool
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Alexia Death,
|
||||
Tor Lillqvist, Geert Jordaens, Daniel Eddeland, Aurimas Juška,
|
||||
Róman Joost, Luidnel Maignan, Barak Itkin, Aurore Derriennic
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.2
|
||||
=====================
|
||||
|
||||
- final touches on the combined Freehand/Polygon Select tool
|
||||
- added a dialog for managing Color tool settings
|
||||
- prepared the code for changes in the upcoming GTK+ release
|
||||
- improved popup scale button
|
||||
- mark the center of rectangles/bounding rectangles during moves
|
||||
- added dialog to query for using the online user manual
|
||||
- allow to map dynamics to hardness for the Eraser tool
|
||||
- provide gimp-remote functionality on Windows
|
||||
- disable the build and install of the gimp-remote tool by default
|
||||
- allow to scroll beyond the image borders
|
||||
- added new PDB data type for transferring color arrays
|
||||
- added new PDB function gimp-palette-get-colors
|
||||
- added text search to the Help Browser plug-in
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Manish Singh,
|
||||
Lars-Peter Clausen, Alexia Death, Tor Lillqvist, Róman Joost,
|
||||
Jakub Steiner
|
||||
|
||||
|
||||
Changes in GIMP 2.5.1
|
||||
=====================
|
||||
|
||||
- further improvements to the status bar
|
||||
- made the center point of rectangles snap to the grid and rulers
|
||||
- improved Alpha to Logo filters
|
||||
- better cursor feedback in the Intelligent Scissors tool
|
||||
- rotate JPEG thumbnails according to the EXIF orientation
|
||||
- improved event smoothing for paint tools
|
||||
- prepared PSP plug-in to deal with newer versions of the file format
|
||||
- allow plug-ins to work in parallel on different layers of the same image
|
||||
- pass through GEGL command-line options
|
||||
- added 22 new variations to the Flame plugin
|
||||
- only show operations from relevant categories in the GEGL tool
|
||||
- allow to enter the zoom ratio in the status bar
|
||||
- don't keep the file-chooser dialogs around
|
||||
- ported scan-convert code to Cairo, removing libart dependency
|
||||
- allow the paint velocity to affect brush size, opacity and the like
|
||||
- allow for random variations of the brush size, opacity and the like
|
||||
- renamed Dialogs menu to Windows
|
||||
- keep a list of recently closed docks in the Windows menu
|
||||
- allow to go from Brightness-Contrast to Levels to Curves
|
||||
- improved the handling of color tool settings
|
||||
- merged the new Polygon Selection tool with the Freehand Select tool
|
||||
- allow to lock dockables
|
||||
- made Desaturate into a tool with preview in the image window
|
||||
- ported translation contexts to msgctxt
|
||||
- added GimpRuler widgets, an improved version of GtkRuler
|
||||
- moving the selection mask now commits a pending rectangle selection
|
||||
- added keyboard shortcut for resetting the brush scale (Backslash)
|
||||
- ported the Help Browser plug-in to WebKit
|
||||
- allow to use the online user manual
|
||||
- added new translation (Icelandic)
|
||||
- bug fixes and code cleanup
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Øyvind Kolås,
|
||||
Alexia Death, Ulf-D. Ehlert, Daniel Hornung, Michael Deal, Aurimas Juška,
|
||||
Luis Barrancos
|
||||
|
||||
|
||||
|
||||
Changes in GIMP 2.5.0
|
||||
=====================
|
||||
|
||||
Core:
|
||||
|
||||
- improved rectangle tool drawing for narrow mode
|
||||
- ported lots (but not all) drawing code to Cairo
|
||||
- optimized image rendering by using pre-multiplied alpha
|
||||
- use new GLib features such as GRegex
|
||||
- use new GTK+ features such as the new GtkTooltip API
|
||||
- much improved GimpCurve object
|
||||
- cleaner and smaller tool options
|
||||
- enable brush scaling for the Smudge tool
|
||||
- added debugging framework that can be enabled at run-time
|
||||
- depend on GEGL and use it optionally in some color operations
|
||||
- optional GEGL processing for all color tools
|
||||
- add proper settings objects for all color tools
|
||||
- add list of recently used settings to all color tools
|
||||
- added experimental GEGL tool to use arbitrary GEGL operations
|
||||
- event filtering and smoothing for better paint tool performance
|
||||
- added motion constraints in the Move Tool
|
||||
- some operations do not any longer automatically add an alpha channel
|
||||
- some preparation for tagging resource files
|
||||
- cutting a selection doesn't clear the selection any longer
|
||||
- added new polygon select tool
|
||||
- load brushes and other data files recursively (search through subdirs)
|
||||
- started work on language selector for the text tool (unfinished)
|
||||
- allow to set opacity of the transform tool preview
|
||||
- merged toolbox menu into the image menu
|
||||
- always keep an image window around
|
||||
- improved image statusbar
|
||||
- dropped 'documents' in favor of ~/.recently-used.xbel
|
||||
- started to work on text box functionality in the text tool
|
||||
- numerous bug fixes and cleanups
|
||||
|
||||
|
||||
Plug-ins:
|
||||
|
||||
- dicom: improved handling of 16 bit image data
|
||||
- help: use GIO to access the help index
|
||||
- print: moved Page Setup out of the Print dialog
|
||||
- psd-load: rewritten, cleaner and more features
|
||||
- randomize: added previews
|
||||
- ripple: added a Phase Shift control
|
||||
- screenshot: optionally add the mouse cursor image on an extra layer
|
||||
- uri: use GIO/GVfs where available
|
||||
- whirlpinch: allow a larger range for the whirl angle
|
||||
|
||||
|
||||
Python binding:
|
||||
|
||||
- allow to specify colors using CSS color names
|
||||
- added new method Image.new_layer()
|
||||
|
||||
|
||||
Script-Fu:
|
||||
|
||||
- enforce R5RS syntax for 'let'
|
||||
- improved Frosty Logo script
|
||||
|
||||
|
||||
PDB:
|
||||
|
||||
- added new text layer API
|
||||
- added gimp-vectors-export-to-file and gimp-vectors-export-to-string
|
||||
- added procedure to test for existance of a procedure in the PDB
|
||||
- improved error handling for procedures
|
||||
|
||||
|
||||
Libraries:
|
||||
|
||||
- added some Cairo utilities
|
||||
- allow to use markup in tooltips
|
||||
- libgimpthumb doesn't any longer depend on other GIMP libraries
|
||||
|
||||
|
||||
Miscellaneous:
|
||||
|
||||
- use the gimptool program on Unix, too, instead of the gimptool script
|
||||
- create the list of supported MIME types at compile-time
|
||||
- gimp shows library versions when called with '--version --verbose'
|
||||
|
||||
|
||||
Contributors:
|
||||
|
||||
Sven Neumann, Michael Natterer, Martin Nordholts, Bill Skaggs,
|
||||
Øyvind Kolås, Manish Singh, Kevin Cozens, Alexia Death, Tor Lillqvist,
|
||||
Marcus Heese, John Marshall, Joao S. O. Bueno, Jakub Steiner,
|
||||
Simon Budig, Tom Lechner, Hans Breuer, ...
|
17
README
17
README
|
@ -3,13 +3,9 @@
|
|||
Development Branch
|
||||
------------------------------
|
||||
|
||||
This is the unstable development branch of GIMP. It is intended to
|
||||
developers only. If you are a user, please use the stable gimp-2-4
|
||||
branch or a tarball release from the 2.4 series.
|
||||
|
||||
GIMP 2.5 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.5. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.5, you have to
|
||||
GIMP 2.7 replaces earlier GIMP 2.x versions. It is advised that you
|
||||
uninstall them before installing GIMP 2.7. If you want to keep your
|
||||
older GIMP 2.x installation in parallel to GIMP 2.7, you have to
|
||||
choose a separate prefix which is not in your default library search
|
||||
path. Otherwise your GIMP 2.4 or GIMP 2.2 installation will start to
|
||||
use the new libraries. You have been warned.
|
||||
|
@ -93,13 +89,13 @@ servers are:
|
|||
The look of GIMP's interface can be customized like any other GTK app
|
||||
by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made
|
||||
customizations). For downloadable themes and further details, see
|
||||
http://gtk.themes.org. Additionally, GIMP reads ~/.gimp-2.4/gtkrc so
|
||||
http://gtk.themes.org. Additionally, GIMP reads ~/.gimp-2.7/gtkrc so
|
||||
you can have settings that only apply to GIMP.
|
||||
|
||||
Included is a set of keybindings similar to those in Adobe Photoshop.
|
||||
You can find them in the ps-menurc file. To use them, copy this file
|
||||
to ~/.gimp-2.5/menurc. You can also manually change the keybindings to
|
||||
any of your choice by editing ~/.gimp-2.5/menurc.
|
||||
to ~/.gimp-2.7/menurc. You can also manually change the keybindings to
|
||||
any of your choice by editing ~/.gimp-2.7/menurc.
|
||||
|
||||
|
||||
Have fun,
|
||||
|
@ -111,3 +107,4 @@ Have fun,
|
|||
Sven Neumann
|
||||
Michael Natterer
|
||||
Dave Neary
|
||||
Martin Nordholts
|
||||
|
|
224
README.i18n
224
README.i18n
|
@ -1,170 +1,28 @@
|
|||
This document exists to document the important things to care
|
||||
for because of locale support. It is aimed at developers and
|
||||
translators. If you are a translator, you can skip the first
|
||||
sections, but you definitely want to read sections 5 - 9.
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Why localisation?
|
||||
2. How
|
||||
3. Deep inside ...
|
||||
4. Some magic ...
|
||||
5. Tools and how to use them
|
||||
6. Gimp is different
|
||||
7. Adding additional textdomains
|
||||
8. Tip of the Day messages
|
||||
9. How to contribute
|
||||
10. And more ?
|
||||
This file contains some important hints for translators.
|
||||
|
||||
|
||||
1. Why localisation?
|
||||
The current status of the GIMP translation can be checked at
|
||||
|
||||
Many persons from many countries start to get used to Linux.
|
||||
Unfortunately not everyone is able to understand English. But
|
||||
even those people sometimes like to use good and free software
|
||||
without using a dictionary to get the unknown words.
|
||||
So why not simply localise the software to make it available to
|
||||
the mass which isn't wholly English native? Of course this also
|
||||
eases the migration from PhotoX to GIMP. :))
|
||||
|
||||
2. How?
|
||||
|
||||
GNU provides a very nice package called gettext. This one offers
|
||||
the possibility to translate chosen messages from the native language
|
||||
of the program into that one of the users if a necessary catalog is
|
||||
provided. Gettext therefore provides some easy tools to create and
|
||||
maintain such catalogs and a few functions which can be called by the
|
||||
program to enable automatic translation at runtime. The program gets
|
||||
linked to the gettext library or glibc2 which already provides that
|
||||
functionality and everything is fine.
|
||||
|
||||
3. Deep inside...
|
||||
|
||||
GIMP provides header files called gimpintl.h and stdplugins-intl.h in
|
||||
the libgimp directory which check whether gettext is available on the
|
||||
system which GIMP is compiled on and will deactivate language support
|
||||
if it's not.
|
||||
|
||||
If the gettext system is there it will declare 3 functions which will be
|
||||
described below.
|
||||
|
||||
3.1 _() [more correctly: char * _( char * )]
|
||||
|
||||
This one is a macro for the function gettext(). You can wrap any text
|
||||
with it that is allowed to be a return value of a function. If you
|
||||
use it then libintl will try to translate it into the native language
|
||||
of the user according to his/her environmental settings.
|
||||
The gettext() function will do a lookup in the hashed catalog which
|
||||
contains all the translated texts.
|
||||
|
||||
- If it is found a pointer to the string will be returned to the caller.
|
||||
- If not, the caller will receive a pointer to the original string.
|
||||
|
||||
This way it is ensured that there isn't any harm caused to the program
|
||||
if no useful catalog is installed.
|
||||
|
||||
Please note that it is important to use _() directly (and not gettext())
|
||||
for simple messages because of reasons that will be mentioned below.
|
||||
|
||||
NOTE: I know some of the developer like short functions like _() but
|
||||
for a better source understanding I suggest to use it consistently only
|
||||
for text (like _("That's text!")) and not for variables (like _(text)).
|
||||
Use gettext(text) instead.
|
||||
http://l10n.gnome.org/module/gimp
|
||||
|
||||
|
||||
3.2 N_() [more correctly: const char * ( const char * ) ]
|
||||
Translation of the GNU Image Manipulation Program is handled by the
|
||||
GNOME Translation Project (see http://l10n.gnome.org/). If you want to
|
||||
help, we suggest that you get in touch with the translation team of
|
||||
your language (see http://l10n.gnome.org/teams/).
|
||||
|
||||
This one is a macro for the function gettext_noop(). As you can see
|
||||
and guess it doesn't really do anything in the programm i.e. it is a
|
||||
dummy macro but nevertheless important. As it isn't possible to call
|
||||
functions in a structure as seen here:
|
||||
|
||||
struct blurb
|
||||
{
|
||||
_("This won't work\n");
|
||||
}
|
||||
GIMP is different
|
||||
|
||||
you have to do it in some other way. In GIMP such structures are
|
||||
often used to create menus or similar things very simply. Here you
|
||||
have to use the dummy to allow the generation of the template catalog
|
||||
which will be described below. This one doesn't do anything but it
|
||||
marks the text as important to the xgettext extractor.
|
||||
|
||||
The text has to be translated manually with the next function.
|
||||
|
||||
3.3 gettext()
|
||||
|
||||
This function is the same as that macro in 3.1. But there is one big
|
||||
difference: The _()'s and N_()'s are the only expressions which get
|
||||
parsed by the template generator.
|
||||
If you have strings that should be translated but are unfortunately
|
||||
in a structure you have to do that on your own which means that you
|
||||
have to parse the fields with the messages in a loop and translate
|
||||
the texts with this gettext() function.
|
||||
|
||||
Please note that it may be necessary to free or allocate memory in
|
||||
this case!
|
||||
|
||||
4. Some magic...
|
||||
|
||||
As you have seen we only did the programming part until now but this
|
||||
isn't all by far. To use catalogs we'll have to create them. Now
|
||||
there are 3 different files which are importart:
|
||||
|
||||
gimp.pot:
|
||||
|
||||
This one is the so called template. It contains the messages which
|
||||
are extracted from the sources and empty fields which have to get
|
||||
filled by the author. It is used to start a new catalog or to update
|
||||
the an already available one.
|
||||
|
||||
The Makefile will automatically call the program gettext which will
|
||||
extract all messages that are wrapped by a _() or a N_() (but NOT
|
||||
gettext()) and concat them to this template.
|
||||
|
||||
[language].po:
|
||||
|
||||
This file has to be an edited gimp.pot and contains the original
|
||||
messages plus the translated ones. This file will be delivered
|
||||
together with GIMP and is the base for the final catalog.
|
||||
|
||||
[language].mo:
|
||||
|
||||
This file is a compiled version of [language.po] which will be
|
||||
automatically compiled by the Makefile system and installed in the
|
||||
locale directory of the system. It contains everything that the .po
|
||||
file contains except not translated messages, comments and other
|
||||
overhead. For maximum speed it is also hashed to allow gettext a
|
||||
faster search.
|
||||
|
||||
5. Tools and how to use them
|
||||
|
||||
As mentioned the to be translated strings are extracted directly from
|
||||
the source and written to the template.
|
||||
|
||||
I guess many of you will now ask if it is necessary to add new
|
||||
strings directly to the template or if there's a tool to achieve
|
||||
that. I think I can calm down those of you who fear lots of had work
|
||||
just to update the language files. There's a program called msgmerge
|
||||
which will add all strings that are in the template but not in the
|
||||
uncompiled catalog to it. Msgmerge does this job very nicely and also
|
||||
tries to use some kind of fuzzy logic method for already translated
|
||||
strings for possible reduction of translators work: If an original
|
||||
string seems similar to a new one and it already has a translation,
|
||||
it will be taken over to the new catalog together with a remark that
|
||||
this one may not necessarily fit.
|
||||
|
||||
6. Gimp is different
|
||||
|
||||
Gimp is a complex application which has a bunch of scripts and
|
||||
GIMP is a complex application which has a bunch of scripts and
|
||||
plug-ins that all want to be internationalized. Therefore there is
|
||||
not one catalog but many. For a full translation of GIMP's UI,
|
||||
you will have to add translations for the following catalogs:
|
||||
not one catalog but many. For a full translation of GIMP's UI, you
|
||||
will have to add translations for the following catalogs:
|
||||
|
||||
po/gimp20.po -- the core
|
||||
po-libgimp/gimp20-libgimp.pot -- the libgimp library
|
||||
po-python/gimp20-python.pot -- the pygimp plug-ins
|
||||
po-plugins/gimp20-std-plugins.pot -- the C plug-ins
|
||||
po-python/gimp20-python.pot -- the pygimp plug-ins
|
||||
po-script-fu/gimp20-script-fu.pot -- the script-fu scripts
|
||||
po-tips/gimp20-tips.pot -- the startup tips
|
||||
|
||||
|
@ -172,32 +30,12 @@ this one may not necessarily fit.
|
|||
gimp-perl has been moved into it's own Subversion module called
|
||||
gimp-perl.
|
||||
|
||||
The version of GIMP you are holding in your hand uses GTK+-2.0.
|
||||
GTK+-2.0 requires that all strings are UTF-8 encoded. Therefore to
|
||||
make internationalisation work, po files need to be UTF-8 encoded. If
|
||||
your editor doesn't support UTF-8, you need to convert it to an
|
||||
encoding your editor can handle and convert it back to UTF-8 before
|
||||
commiting your changes back. The gnome-i18n module in Subversion has
|
||||
some scripts that help with this task, but it can also easily done
|
||||
using iconv.
|
||||
|
||||
7. Adding additional textdomains
|
||||
GIMP Tips dialog
|
||||
|
||||
Third-party plug-ins (plug-ins that are not distributed with The
|
||||
GIMP) can't have their messages in the gimp-std-plugins textdomain.
|
||||
We have therefore provided a mechanism that allows plug-ins to
|
||||
install their own message catalogs and tell GIMP to bind to that
|
||||
textdomain. This is necessary so that GIMP can correctly translate
|
||||
the menu paths the plug-in registers. Basically the plug-in has to
|
||||
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
|
||||
before it registers any functions. Have a look at the script-fu
|
||||
plug-in to see how this is done in detail.
|
||||
|
||||
8. Tip of the Day messages
|
||||
|
||||
In addition to message catalogs Gimp provides a file with tips that
|
||||
are displayed in a Tip of The Day window. This file is in XML format
|
||||
and can be found in the tips directory. The english tips messages are
|
||||
In addition to message catalogs GIMP provides a file with tips that
|
||||
are displayed in the Tips dialog. This file is in XML format and can
|
||||
be found in the tips directory. The english tips messages are
|
||||
extracted from gimp-tips.xml.in so translators can use the usual
|
||||
tools to create a <lang>.po file that holds the translations. All
|
||||
translations are then merged into gimp-tips.xml with language
|
||||
|
@ -208,27 +46,19 @@ this one may not necessarily fit.
|
|||
message catalog that needs to be translated correctly. For a german
|
||||
translation of the tips this would look like this:
|
||||
|
||||
#: app/gui/tips-parser.c:158
|
||||
#: ../app/dialogs/tips-parser.c:188
|
||||
msgid "tips-locale:C"
|
||||
msgstr "tips-locale:de"
|
||||
|
||||
9. How to contribute
|
||||
|
||||
Any help with translations is appreciated. If you want to help,
|
||||
please get in contact with the people from the GNOME Translation
|
||||
Project who coordinate all translation efforts in the GNOME
|
||||
Subversion tree. They have a nice web-page at
|
||||
http://developer.gnome.org/projects/gtp/.
|
||||
|
||||
10. And more?
|
||||
|
||||
We hope we mentioned everything that is worth it and hope that this
|
||||
document will clarify some things. If it doesn't please write us a
|
||||
mail. This text of course contains errors, so if you find one tell
|
||||
us...
|
||||
|
||||
|
||||
Happy Gimping.
|
||||
Daniel Egger
|
||||
Sven Neumann
|
||||
Localization of third-party plug-ins
|
||||
|
||||
Third-party plug-ins (plug-ins that are not distributed with GIMP)
|
||||
can't have their messages in the gimp-std-plugins textdomain. We
|
||||
have therefore provided a mechanism that allows plug-ins to install
|
||||
their own message catalogs and tell GIMP to bind to that
|
||||
textdomain. This is necessary so that GIMP can correctly translate
|
||||
the menu paths the plug-in registers. Basically the plug-in has to
|
||||
call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path()
|
||||
before it registers any functions. Have a look at the script-fu
|
||||
plug-in to see how this is done in detail.
|
||||
|
|
|
@ -33,9 +33,9 @@ SUBDIRS = \
|
|||
|
||||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
bin_PROGRAMS = gimp-2.5 gimp-console-2.5
|
||||
bin_PROGRAMS = gimp-2.7 gimp-console-2.7
|
||||
else
|
||||
bin_PROGRAMS = gimp-2.5
|
||||
bin_PROGRAMS = gimp-2.7
|
||||
endif
|
||||
|
||||
app_sources = \
|
||||
|
@ -59,7 +59,7 @@ app_sources = \
|
|||
gimp-log.h \
|
||||
gimp-intl.h
|
||||
|
||||
gimp_2_5_SOURCES = $(app_sources)
|
||||
gimp_2_7_SOURCES = $(app_sources)
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
@ -102,9 +102,9 @@ AM_LDFLAGS = \
|
|||
-u $(SYMPREFIX)gimp_image_map_config_get_type \
|
||||
-u $(SYMPREFIX)gimp_plug_in_manager_restore
|
||||
|
||||
gimp_2_5_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
|
||||
gimp_2_7_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
|
||||
|
||||
gimp_2_5_LDADD = \
|
||||
gimp_2_7_LDADD = \
|
||||
gui/libappgui.a \
|
||||
actions/libappactions.a \
|
||||
dialogs/libappdialogs.a \
|
||||
|
@ -133,7 +133,6 @@ gimp_2_5_LDADD = \
|
|||
$(libgimpmath) \
|
||||
$(libgimpconfig) \
|
||||
$(libgimpbase) \
|
||||
$(REGEXREPL) \
|
||||
$(GTK_LIBS) \
|
||||
$(PANGOFT2_LIBS) \
|
||||
$(FONTCONFIG_LIBS) \
|
||||
|
@ -147,13 +146,13 @@ gimp_2_5_LDADD = \
|
|||
|
||||
if ENABLE_GIMP_CONSOLE
|
||||
|
||||
gimp_console_2_5_SOURCES = $(app_sources)
|
||||
gimp_console_2_7_SOURCES = $(app_sources)
|
||||
|
||||
gimp_console_2_5_CPPFLAGS = \
|
||||
gimp_console_2_7_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
-DGIMP_CONSOLE_COMPILATION
|
||||
|
||||
gimp_console_2_5_LDADD = \
|
||||
gimp_console_2_7_LDADD = \
|
||||
widgets/widgets-enums.o \
|
||||
display/display-enums.o \
|
||||
display/gimpdisplayoptions.o \
|
||||
|
@ -177,7 +176,6 @@ gimp_console_2_5_LDADD = \
|
|||
$(libgimpmath) \
|
||||
$(libgimpconfig) \
|
||||
$(libgimpbase) \
|
||||
$(REGEXREPL) \
|
||||
$(GDK_PIXBUF_LIBS) \
|
||||
$(CAIRO_LIBS) \
|
||||
$(PANGOFT2_LIBS) \
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Actions\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GEGL_CFLAGS) \
|
||||
$(GTK_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
noinst_LIBRARIES = libappactions.a
|
||||
|
||||
libappactions_a_SOURCES = \
|
||||
|
@ -23,6 +35,10 @@ libappactions_a_SOURCES = \
|
|||
colormap-actions.h \
|
||||
colormap-commands.c \
|
||||
colormap-commands.h \
|
||||
config-actions.c \
|
||||
config-actions.h \
|
||||
config-commands.c \
|
||||
config-commands.h \
|
||||
context-actions.c \
|
||||
context-actions.h \
|
||||
context-commands.c \
|
||||
|
@ -158,18 +174,4 @@ libappactions_a_SOURCES = \
|
|||
windows-commands.c \
|
||||
windows-commands.h
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
makefile.msc
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Actions\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
-I$(includedir)
|
||||
EXTRA_DIST = makefile.msc
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
@ -52,6 +53,7 @@
|
|||
#include "buffers-actions.h"
|
||||
#include "channels-actions.h"
|
||||
#include "colormap-actions.h"
|
||||
#include "config-actions.h"
|
||||
#include "context-actions.h"
|
||||
#include "cursor-info-actions.h"
|
||||
#include "debug-actions.h"
|
||||
|
@ -112,7 +114,10 @@ static GimpActionFactoryEntry action_groups[] =
|
|||
{ "colormap", N_("Colormap"), GIMP_STOCK_COLORMAP,
|
||||
colormap_actions_setup,
|
||||
colormap_actions_update },
|
||||
{ "context", N_("Context"), NULL,
|
||||
{ "config", N_("Configuration"), GTK_STOCK_PREFERENCES,
|
||||
config_actions_setup,
|
||||
config_actions_update },
|
||||
{ "context", N_("Context"), GIMP_STOCK_TOOL_OPTIONS /* well... */,
|
||||
context_actions_setup,
|
||||
context_actions_update },
|
||||
{ "cursor-info", N_("Pointer Information"), NULL,
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
@ -166,7 +167,7 @@ channels_new_last_vals_cmd_callback (GtkAction *action,
|
|||
action_data_get_context (data),
|
||||
GIMP_TRANSPARENT_FILL);
|
||||
|
||||
gimp_image_add_channel (image, new_channel, -1);
|
||||
gimp_image_add_channel (image, new_channel, -1, TRUE);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
|
@ -181,7 +182,7 @@ channels_raise_cmd_callback (GtkAction *action,
|
|||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_raise_channel (image, channel);
|
||||
gimp_image_raise_channel (image, channel, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -205,7 +206,7 @@ channels_lower_cmd_callback (GtkAction *action,
|
|||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_lower_channel (image, channel);
|
||||
gimp_image_lower_channel (image, channel, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -262,7 +263,7 @@ channels_duplicate_cmd_callback (GtkAction *action,
|
|||
G_TYPE_FROM_INSTANCE (channel)));
|
||||
}
|
||||
|
||||
gimp_image_add_channel (image, new_channel, -1);
|
||||
gimp_image_add_channel (image, new_channel, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -274,7 +275,7 @@ channels_delete_cmd_callback (GtkAction *action,
|
|||
GimpChannel *channel;
|
||||
return_if_no_channel (image, channel, data);
|
||||
|
||||
gimp_image_remove_channel (image, channel);
|
||||
gimp_image_remove_channel (image, channel, TRUE, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -356,7 +357,7 @@ channels_new_channel_response (GtkWidget *widget,
|
|||
GIMP_TRANSPARENT_FILL);
|
||||
}
|
||||
|
||||
gimp_image_add_channel (options->image, new_channel, -1);
|
||||
gimp_image_add_channel (options->image, new_channel, -1, TRUE);
|
||||
gimp_image_flush (options->image);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
|
||||
#include "config-actions.h"
|
||||
#include "config-commands.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static const GimpToggleActionEntry config_toggle_actions[] =
|
||||
{
|
||||
{ "config-use-gegl", NULL,
|
||||
N_("Use _GEGL"), NULL,
|
||||
N_("If possible, use GEGL for image processing"),
|
||||
G_CALLBACK (config_use_gegl_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_CONFIG_USE_GEGL }
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
config_actions_use_gegl_notify (GObject *config,
|
||||
GParamSpec *pspec,
|
||||
GimpActionGroup *group)
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
g_object_get (config,
|
||||
"use-gegl", &active,
|
||||
NULL);
|
||||
|
||||
gimp_action_group_set_action_active (group, "config-use-gegl", active);
|
||||
}
|
||||
|
||||
void
|
||||
config_actions_setup (GimpActionGroup *group)
|
||||
{
|
||||
gimp_action_group_add_toggle_actions (group,
|
||||
config_toggle_actions,
|
||||
G_N_ELEMENTS (config_toggle_actions));
|
||||
|
||||
config_actions_use_gegl_notify (G_OBJECT (group->gimp->config), NULL, group);
|
||||
|
||||
g_signal_connect_object (group->gimp->config,
|
||||
"notify::use-gegl",
|
||||
G_CALLBACK (config_actions_use_gegl_notify),
|
||||
group, 0);
|
||||
}
|
||||
|
||||
void
|
||||
config_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_ACTIONS_H__
|
||||
#define __CONFIG_ACTIONS_H__
|
||||
|
||||
|
||||
void config_actions_setup (GimpActionGroup *group);
|
||||
void config_actions_update (GimpActionGroup *group,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONFIG_ACTIONS_H__ */
|
|
@ -0,0 +1,43 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "config-commands.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
config_use_gegl_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GtkToggleAction *toggle_action = GTK_TOGGLE_ACTION (action);
|
||||
Gimp *gimp = action_data_get_gimp (data);
|
||||
|
||||
g_object_set (gimp->config,
|
||||
"use-gegl", gtk_toggle_action_get_active (toggle_action),
|
||||
NULL);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* 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 2 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, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_COMMANDS_H__
|
||||
#define __CONFIG_COMMANDS_H__
|
||||
|
||||
|
||||
void config_use_gegl_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __CONFIG_COMMANDS_H__ */
|
|
@ -77,31 +77,31 @@ static const GimpActionEntry context_actions[] =
|
|||
static GimpEnumActionEntry context_palette_foreground_actions[] =
|
||||
{
|
||||
{ "context-palette-foreground-set", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Set", NULL, NULL,
|
||||
"Foreground Palette Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-first", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color First", NULL, NULL,
|
||||
"Foreground Palette Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-last", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Last", NULL, NULL,
|
||||
"Foreground Palette Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-previous", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Previous", NULL, NULL,
|
||||
"Foreground Palette Color Previous", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-next", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Next", NULL, NULL,
|
||||
"Foreground Palette Color Next", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-previous-skip", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Skip Back", NULL, NULL,
|
||||
"Foreground Palette Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-foreground-next-skip", GIMP_STOCK_PALETTE,
|
||||
"Foreground Palette color Skip Forward", NULL, NULL,
|
||||
"Foreground Palette Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -109,31 +109,31 @@ static GimpEnumActionEntry context_palette_foreground_actions[] =
|
|||
static GimpEnumActionEntry context_palette_background_actions[] =
|
||||
{
|
||||
{ "context-palette-background-set", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Set", NULL, NULL,
|
||||
"Background Palette Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-first", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color First", NULL, NULL,
|
||||
"Background Palette Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-last", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Last", NULL, NULL,
|
||||
"Background Palette Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-previous", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Previous", NULL, NULL,
|
||||
"Background Palette Color Previous", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-next", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Next", NULL, NULL,
|
||||
"Background Palette Color Next", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-previous-skip", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Skip Back", NULL, NULL,
|
||||
"Background Palette Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-palette-background-next-skip", GIMP_STOCK_PALETTE,
|
||||
"Background Palette color Skip ahead", NULL, NULL,
|
||||
"Background Palette Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -141,31 +141,31 @@ static GimpEnumActionEntry context_palette_background_actions[] =
|
|||
static GimpEnumActionEntry context_colormap_foreground_actions[] =
|
||||
{
|
||||
{ "context-colormap-foreground-set", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Set", NULL, NULL,
|
||||
"Foreground Colormap Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-first", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color First", NULL, NULL,
|
||||
"Foreground Colormap Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-last", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Last", NULL, NULL,
|
||||
"Foreground Colormap Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-previous", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Previous", NULL, NULL,
|
||||
"Foreground Colormap Color Previous", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-next", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Next", NULL, NULL,
|
||||
"Foreground Colormap Color Next", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-previous-skip", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Skip Back", NULL, NULL,
|
||||
"Foreground Colormap Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-foreground-next-skip", GIMP_STOCK_COLORMAP,
|
||||
"Foreground Colormap color Skip Forward", NULL, NULL,
|
||||
"Foreground Colormap Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -173,31 +173,31 @@ static GimpEnumActionEntry context_colormap_foreground_actions[] =
|
|||
static GimpEnumActionEntry context_colormap_background_actions[] =
|
||||
{
|
||||
{ "context-colormap-background-set", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Set", NULL, NULL,
|
||||
"Background Colormap Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-first", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color First", NULL, NULL,
|
||||
"Background Colormap Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-last", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Last", NULL, NULL,
|
||||
"Background Colormap Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-previous", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Previous", NULL, NULL,
|
||||
"Background Colormap Color Previous", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-next", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Next", NULL, NULL,
|
||||
"Background Colormap Color Next", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-previous-skip", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Skip Back", NULL, NULL,
|
||||
"Background Colormap Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-colormap-background-next-skip", GIMP_STOCK_COLORMAP,
|
||||
"Background Colormap color Skip ahead", NULL, NULL,
|
||||
"Background Colormap Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -205,31 +205,31 @@ static GimpEnumActionEntry context_colormap_background_actions[] =
|
|||
static GimpEnumActionEntry context_swatch_foreground_actions[] =
|
||||
{
|
||||
{ "context-swatch-foreground-set", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Set", NULL, NULL,
|
||||
"Foreground Swatch Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-first", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color First", NULL, NULL,
|
||||
"Foreground Swatch Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-last", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Last", NULL, NULL,
|
||||
"Foreground Swatch Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-previous", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Previous", "9", NULL,
|
||||
"Foreground Swatch Color Previous", "9", NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-next", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Next", "0", NULL,
|
||||
"Foreground Swatch Color Next", "0", NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-previous-skip", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Skip Back", NULL, NULL,
|
||||
"Foreground Swatch Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-foreground-next-skip", GIMP_STOCK_PALETTE,
|
||||
"Foreground Swatch color Skip Forward", NULL, NULL,
|
||||
"Foreground Swatch Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -237,31 +237,31 @@ static GimpEnumActionEntry context_swatch_foreground_actions[] =
|
|||
static GimpEnumActionEntry context_swatch_background_actions[] =
|
||||
{
|
||||
{ "context-swatch-background-set", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Set", NULL, NULL,
|
||||
"Background Swatch Color Set", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SET, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-first", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color First", NULL, NULL,
|
||||
"Background Swatch Color First", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_FIRST, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-last", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Last", NULL, NULL,
|
||||
"Background Swatch Color Last", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_LAST, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-previous", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Previous", NULL, NULL,
|
||||
"Background Swatch Color Previous", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-next", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Next", NULL, NULL,
|
||||
"Background Swatch Color Next", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-previous-skip", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Skip Back", NULL, NULL,
|
||||
"Background Swatch Color Skip Back", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-swatch-background-next-skip", GIMP_STOCK_PALETTE,
|
||||
"Background Swatch color Skip ahead", NULL, NULL,
|
||||
"Background Swatch Color Skip Forward", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
@ -1061,11 +1061,11 @@ static const GimpEnumActionEntry context_brush_angle_actions[] =
|
|||
GIMP_ACTION_SELECT_NEXT, FALSE,
|
||||
NULL },
|
||||
{ "context-brush-angle-decrease-skip", GIMP_STOCK_BRUSH,
|
||||
"Rotate Right 15 degrees", NULL, NULL,
|
||||
"Rotate Right 15°", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_PREVIOUS, FALSE,
|
||||
NULL },
|
||||
{ "context-brush-angle-increase-skip", GIMP_STOCK_BRUSH,
|
||||
"Rotate Left 15 degrees", NULL, NULL,
|
||||
"Rotate Left 15°", NULL, NULL,
|
||||
GIMP_ACTION_SELECT_SKIP_NEXT, FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
|
|
@ -118,7 +118,7 @@ context_colors_swap_cmd_callback (GtkAction *action,
|
|||
gimp_context_swap_colors (context);
|
||||
}
|
||||
|
||||
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, usec, usep) \
|
||||
#define SELECT_COLOR_CMD_CALLBACK(name, fgbg, use_colormap, use_palette) \
|
||||
void \
|
||||
context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
|
||||
gint value, \
|
||||
|
@ -129,7 +129,8 @@ context_##name##_##fgbg##ground_cmd_callback (GtkAction *action, \
|
|||
return_if_no_context (context, data); \
|
||||
\
|
||||
gimp_context_get_##fgbg##ground (context, &color); \
|
||||
context_select_color ((GimpActionSelectType) value, &color, usec, usep); \
|
||||
context_select_color ((GimpActionSelectType) value, &color, \
|
||||
use_colormap, use_palette); \
|
||||
gimp_context_set_##fgbg##ground (context, &color); \
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "actions-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
|
||||
#include "debug-actions.h"
|
||||
|
|
|
@ -119,7 +119,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
|||
"gimp-brush-grid|gimp-brush-list",
|
||||
GIMP_HELP_BRUSH_DIALOG },
|
||||
|
||||
{ "dialogs-brush-editor", NULL,
|
||||
{ "dialogs-brush-editor", GIMP_STOCK_BRUSH,
|
||||
N_("Brush Editor"), NULL,
|
||||
N_("Open the brush editor"),
|
||||
"gimp-brush-editor",
|
||||
|
@ -137,7 +137,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
|||
"gimp-gradient-list|gimp-gradient-grid",
|
||||
GIMP_HELP_GRADIENT_DIALOG },
|
||||
|
||||
{ "dialogs-gradient-editor", NULL,
|
||||
{ "dialogs-gradient-editor", GIMP_STOCK_GRADIENT,
|
||||
N_("Gradient Editor"), NULL,
|
||||
N_("Open the gradient editor"),
|
||||
"gimp-gradient-editor",
|
||||
|
@ -149,7 +149,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
|||
"gimp-palette-list|gimp-palette-grid",
|
||||
GIMP_HELP_PALETTE_DIALOG },
|
||||
|
||||
{ "dialogs-palette-editor", NULL,
|
||||
{ "dialogs-palette-editor", GIMP_STOCK_PALETTE,
|
||||
N_("Palette Editor"), NULL,
|
||||
N_("Open the palette editor"),
|
||||
"gimp-palette-editor",
|
||||
|
@ -173,7 +173,7 @@ const GimpStringActionEntry dialogs_dockable_actions[] =
|
|||
"gimp-image-list|gimp-image-grid",
|
||||
GIMP_HELP_IMAGE_DIALOG },
|
||||
|
||||
{ "dialogs-document-history", GTK_STOCK_OPEN,
|
||||
{ "dialogs-document-history", "document-open-recent",
|
||||
N_("Document Histor_y"), "",
|
||||
N_("Open the document history dialog"),
|
||||
"gimp-document-list|gimp-document-grid",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
static const GimpActionEntry documents_actions[] =
|
||||
{
|
||||
{ "documents-popup", GTK_STOCK_OPEN,
|
||||
{ "documents-popup", "document-open-recent",
|
||||
N_("Documents Menu"), NULL, NULL, NULL,
|
||||
GIMP_HELP_DOCUMENT_DIALOG },
|
||||
|
||||
|
@ -48,13 +48,13 @@ static const GimpActionEntry documents_actions[] =
|
|||
G_CALLBACK (documents_open_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-raise-or-open", GTK_STOCK_OPEN,
|
||||
{ "documents-raise-or-open", NULL,
|
||||
N_("_Raise or Open Image"), "",
|
||||
N_("Raise window if already open"),
|
||||
G_CALLBACK (documents_raise_or_open_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_OPEN },
|
||||
|
||||
{ "documents-file-open-dialog", GTK_STOCK_OPEN,
|
||||
{ "documents-file-open-dialog", NULL,
|
||||
N_("File Open _Dialog"), "",
|
||||
N_("Open image dialog"),
|
||||
G_CALLBACK (documents_file_open_dialog_cmd_callback),
|
||||
|
@ -84,13 +84,13 @@ static const GimpActionEntry documents_actions[] =
|
|||
G_CALLBACK (documents_recreate_preview_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-reload-previews", GTK_STOCK_REFRESH,
|
||||
{ "documents-reload-previews", NULL,
|
||||
N_("Reload _all Previews"), "",
|
||||
N_("Reload all previews"),
|
||||
G_CALLBACK (documents_reload_previews_cmd_callback),
|
||||
GIMP_HELP_DOCUMENT_REFRESH },
|
||||
|
||||
{ "documents-remove-dangling", GTK_STOCK_REFRESH,
|
||||
{ "documents-remove-dangling", NULL,
|
||||
N_("Remove Dangling E_ntries"), "",
|
||||
N_("Remove dangling entries"),
|
||||
G_CALLBACK (documents_remove_dangling_cmd_callback),
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
@ -118,7 +119,7 @@ static const GimpActionEntry edit_actions[] =
|
|||
|
||||
{ "edit-copy-visible", NULL, /* GIMP_STOCK_COPY_VISIBLE, */
|
||||
N_("Copy _Visible"), "<control><shift>C",
|
||||
N_("Copy what is visible in the the selected region"),
|
||||
N_("Copy what is visible in the selected region"),
|
||||
G_CALLBACK (edit_copy_visible_cmd_callback),
|
||||
GIMP_HELP_EDIT_COPY_VISIBLE },
|
||||
|
||||
|
@ -254,7 +255,7 @@ void
|
|||
edit_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpDrawable *drawable = NULL;
|
||||
gchar *undo_name = NULL;
|
||||
gchar *redo_name = NULL;
|
||||
|
@ -264,38 +265,43 @@ edit_actions_update (GimpActionGroup *group,
|
|||
|
||||
if (image)
|
||||
{
|
||||
GimpUndo *undo;
|
||||
GimpUndo *redo;
|
||||
|
||||
drawable = gimp_image_get_active_drawable (image);
|
||||
|
||||
undo_enabled = gimp_image_undo_is_enabled (image);
|
||||
|
||||
if (undo_enabled)
|
||||
{
|
||||
undo = gimp_undo_stack_peek (image->undo_stack);
|
||||
redo = gimp_undo_stack_peek (image->redo_stack);
|
||||
GimpUndo *undo = gimp_undo_stack_peek (image->undo_stack);
|
||||
GimpUndo *redo = gimp_undo_stack_peek (image->redo_stack);
|
||||
|
||||
if (undo)
|
||||
undo_name =
|
||||
g_strdup_printf (_("_Undo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
{
|
||||
undo_name =
|
||||
g_strdup_printf (_("_Undo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
}
|
||||
|
||||
if (redo)
|
||||
redo_name =
|
||||
g_strdup_printf (_("_Redo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (redo)));
|
||||
{
|
||||
redo_name =
|
||||
g_strdup_printf (_("_Redo %s"),
|
||||
gimp_object_get_name (GIMP_OBJECT (redo)));
|
||||
}
|
||||
|
||||
undo = gimp_image_undo_get_fadeable (image);
|
||||
|
||||
if (GIMP_IS_DRAWABLE_UNDO (undo) &&
|
||||
GIMP_DRAWABLE_UNDO (undo)->src2_tiles)
|
||||
fade_enabled = TRUE;
|
||||
{
|
||||
fade_enabled = TRUE;
|
||||
}
|
||||
|
||||
if (fade_enabled)
|
||||
fade_name =
|
||||
g_strdup_printf (_("_Fade %s..."),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
{
|
||||
fade_name =
|
||||
g_strdup_printf (_("_Fade %s..."),
|
||||
gimp_object_get_name (GIMP_OBJECT (undo)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
@ -339,7 +340,7 @@ edit_paste_as_new_layer_cmd_callback (GtkAction *action,
|
|||
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
|
||||
g_object_unref (buffer);
|
||||
|
||||
gimp_image_add_layer (image, layer, -1);
|
||||
gimp_image_add_layer (image, layer, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
@ -64,7 +65,7 @@ static void file_actions_close_all_update (GimpContainer *images,
|
|||
static const GimpActionEntry file_actions[] =
|
||||
{
|
||||
{ "file-menu", NULL, N_("_File") },
|
||||
{ "file-new-menu", NULL, N_("Ne_w") },
|
||||
{ "file-create-menu", NULL, N_("Create") },
|
||||
{ "file-open-recent-menu", NULL, N_("Open _Recent") },
|
||||
|
||||
{ "file-open", GTK_STOCK_OPEN,
|
||||
|
@ -235,7 +236,6 @@ file_actions_update (GimpActionGroup *group,
|
|||
#define SET_SENSITIVE(action,condition) \
|
||||
gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
|
||||
|
||||
SET_SENSITIVE ("file-open-as-layers", image);
|
||||
SET_SENSITIVE ("file-save", image && drawable);
|
||||
SET_SENSITIVE ("file-save-as", image && drawable);
|
||||
SET_SENSITIVE ("file-save-a-copy", image && drawable);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
@ -64,8 +65,9 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void file_open_dialog_show (GtkWidget *parent,
|
||||
Gimp *gimp,
|
||||
static void file_open_dialog_show (Gimp *gimp,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
GimpImage *image,
|
||||
const gchar *uri,
|
||||
gboolean open_as_layers);
|
||||
|
@ -92,18 +94,16 @@ file_open_cmd_callback (GtkAction *action,
|
|||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpImage *image;
|
||||
GtkWidget *widget;
|
||||
const gchar *uri = NULL;
|
||||
GimpImage *image;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
image = action_data_get_image (data);
|
||||
|
||||
if (image)
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
|
||||
file_open_dialog_show (widget, gimp, NULL, uri, FALSE);
|
||||
file_open_dialog_show (gimp, widget,
|
||||
_("Open Image"),
|
||||
image, NULL, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -111,18 +111,20 @@ file_open_as_layers_cmd_callback (GtkAction *action,
|
|||
gpointer data)
|
||||
{
|
||||
Gimp *gimp;
|
||||
GimpDisplay *display;
|
||||
GtkWidget *widget;
|
||||
GimpImage *image;
|
||||
const gchar *uri;
|
||||
GimpDisplay *display;
|
||||
GimpImage *image = NULL;
|
||||
return_if_no_gimp (gimp, data);
|
||||
return_if_no_display (display, data);
|
||||
return_if_no_widget (widget, data);
|
||||
|
||||
image = display->image;
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
display = action_data_get_display (data);
|
||||
|
||||
file_open_dialog_show (widget, gimp, image, uri, TRUE);
|
||||
if (display)
|
||||
image = display->image;
|
||||
|
||||
file_open_dialog_show (gimp, widget,
|
||||
_("Open Image as Layers"),
|
||||
image, NULL, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -445,15 +447,18 @@ file_file_open_dialog (Gimp *gimp,
|
|||
const gchar *uri,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
file_open_dialog_show (parent, gimp, NULL, uri, FALSE);
|
||||
file_open_dialog_show (gimp, parent,
|
||||
_("Open Image"),
|
||||
NULL, uri, FALSE);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
file_open_dialog_show (GtkWidget *parent,
|
||||
Gimp *gimp,
|
||||
file_open_dialog_show (Gimp *gimp,
|
||||
GtkWidget *parent,
|
||||
const gchar *title,
|
||||
GimpImage *image,
|
||||
const gchar *uri,
|
||||
gboolean open_as_layers)
|
||||
|
@ -466,27 +471,23 @@ file_open_dialog_show (GtkWidget *parent,
|
|||
|
||||
if (dialog)
|
||||
{
|
||||
if (! uri && image)
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (image));
|
||||
|
||||
if (! uri)
|
||||
uri = g_object_get_data (G_OBJECT (gimp), "gimp-file-open-last-uri");
|
||||
|
||||
if (uri)
|
||||
gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
|
||||
|
||||
if (open_as_layers)
|
||||
{
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), _("Open Image as Layers"));
|
||||
GIMP_FILE_DIALOG (dialog)->image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), _("Open Image"));
|
||||
GIMP_FILE_DIALOG (dialog)->image = NULL;
|
||||
}
|
||||
gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog),
|
||||
image, open_as_layers);
|
||||
|
||||
parent = gtk_widget_get_toplevel (parent);
|
||||
|
||||
if (GTK_IS_WINDOW (parent))
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog),
|
||||
GTK_WINDOW (parent));
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
@ -528,8 +529,8 @@ file_save_dialog_show (GimpImage *image,
|
|||
{
|
||||
gtk_window_set_title (GTK_WINDOW (dialog), title);
|
||||
|
||||
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (dialog),
|
||||
image, save_a_copy, close_after_saving);
|
||||
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
|
||||
image, save_a_copy, close_after_saving);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "actions-types.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
@ -328,7 +329,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action,
|
|||
layer_fill_type);
|
||||
gimp_item_translate (GIMP_ITEM (new_layer), off_x, off_y, FALSE);
|
||||
|
||||
gimp_image_add_layer (image, new_layer, -1);
|
||||
gimp_image_add_layer (image, new_layer, -1, TRUE);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
|
@ -351,7 +352,7 @@ layers_new_from_visible_cmd_callback (GtkAction *action,
|
|||
gimp_image_base_type_with_alpha (image),
|
||||
_("Visible"),
|
||||
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
|
||||
gimp_image_add_layer (image, layer, -1);
|
||||
gimp_image_add_layer (image, layer, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
@ -387,7 +388,7 @@ layers_raise_cmd_callback (GtkAction *action,
|
|||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
gimp_image_raise_layer (image, layer);
|
||||
gimp_image_raise_layer (image, layer, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -411,7 +412,7 @@ layers_lower_cmd_callback (GtkAction *action,
|
|||
GimpLayer *layer;
|
||||
return_if_no_layer (image, layer, data);
|
||||
|
||||
gimp_image_lower_layer (image, layer);
|
||||
gimp_image_lower_layer (image, layer, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -438,7 +439,7 @@ layers_duplicate_cmd_callback (GtkAction *action,
|
|||
|
||||
new_layer = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (layer),
|
||||
G_TYPE_FROM_INSTANCE (layer)));
|
||||
gimp_image_add_layer (image, new_layer, -1);
|
||||
gimp_image_add_layer (image, new_layer, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
@ -482,7 +483,7 @@ layers_delete_cmd_callback (GtkAction *action,
|
|||
if (gimp_layer_is_floating_sel (layer))
|
||||
floating_sel_remove (layer);
|
||||
else
|
||||
gimp_image_remove_layer (image, layer);
|
||||
gimp_image_remove_layer (image, layer, TRUE, NULL);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
@ -517,7 +518,7 @@ layers_text_to_vectors_cmd_callback (GtkAction *action,
|
|||
gimp_item_offsets (GIMP_ITEM (layer), &x, &y);
|
||||
gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE);
|
||||
|
||||
gimp_image_add_vectors (image, vectors, -1);
|
||||
gimp_image_add_vectors (image, vectors, -1, TRUE);
|
||||
gimp_image_set_active_vectors (image, vectors);
|
||||
|
||||
gimp_image_flush (image);
|
||||
|
@ -545,7 +546,7 @@ layers_text_along_vectors_cmd_callback (GtkAction *action,
|
|||
|
||||
gimp_item_set_visible (GIMP_ITEM (new_vectors), TRUE, FALSE);
|
||||
|
||||
gimp_image_add_vectors (image, new_vectors, -1);
|
||||
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
|
||||
gimp_image_set_active_vectors (image, new_vectors);
|
||||
|
||||
gimp_image_flush (image);
|
||||
|
@ -961,7 +962,7 @@ layers_new_layer_response (GtkWidget *widget,
|
|||
gimp_drawable_fill_by_type (GIMP_DRAWABLE (layer),
|
||||
dialog->context,
|
||||
layer_fill_type);
|
||||
gimp_image_add_layer (dialog->image, layer, -1);
|
||||
gimp_image_add_layer (dialog->image, layer, -1, TRUE);
|
||||
|
||||
gimp_image_flush (dialog->image);
|
||||
}
|
||||
|
@ -1049,7 +1050,7 @@ layers_add_mask_response (GtkWidget *widget,
|
|||
if (layer_mask_invert)
|
||||
gimp_channel_invert (GIMP_CHANNEL (mask), FALSE);
|
||||
|
||||
gimp_layer_add_mask (layer, mask, TRUE);
|
||||
gimp_layer_add_mask (layer, mask, TRUE, NULL);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ INCLUDES = \
|
|||
-I$(PRJ_TOP) \
|
||||
-I$(PRJ_TOP)/app \
|
||||
$(GTK2_CFLAGS) \
|
||||
$(GEGL_CFLAGS)
|
||||
|
||||
DEFINES = \
|
||||
-DGIMP_COMPILATION \
|
||||
|
@ -35,6 +36,8 @@ OBJECTS = \
|
|||
context-commands.obj \
|
||||
colormap-actions.obj \
|
||||
colormap-commands.obj \
|
||||
config-actions.obj \
|
||||
config-commands.obj \
|
||||
cursor-info-actions.obj \
|
||||
cursor-info-commands.obj \
|
||||
data-commands.obj \
|
||||
|
@ -98,6 +101,8 @@ OBJECTS = \
|
|||
view-commands.obj \
|
||||
window-actions.obj \
|
||||
window-commands.obj \
|
||||
windows-actions.obj \
|
||||
windows-commands.obj \
|
||||
|
||||
|
||||
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
@ -488,6 +489,8 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
|
|||
gchar *reshow;
|
||||
gboolean sensitive = FALSE;
|
||||
|
||||
label = gimp_plug_in_procedure_get_label (proc);
|
||||
|
||||
/* copy the sensitivity of the plug-in procedure's actual action
|
||||
* instead of calling plug_in_actions_update() because doing the
|
||||
* latter would set the sensitivity of this image's action on
|
||||
|
@ -498,8 +501,6 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
|
|||
if (actual_action)
|
||||
sensitive = gtk_action_get_sensitive (actual_action);
|
||||
|
||||
label = gimp_plug_in_procedure_get_label (proc);
|
||||
|
||||
repeat = g_strdup_printf (_("Re_peat \"%s\""), label);
|
||||
reshow = g_strdup_printf (_("R_e-Show \"%s\""), label);
|
||||
|
||||
|
@ -527,16 +528,28 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
|
|||
|
||||
for (i = 0; i < gimp_plug_in_manager_history_length (manager); i++)
|
||||
{
|
||||
GtkAction *action;
|
||||
GtkAction *actual_action;
|
||||
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
|
||||
gboolean sensitive = FALSE;
|
||||
GtkAction *action;
|
||||
GtkAction *actual_action;
|
||||
const gchar *label;
|
||||
gchar *name;
|
||||
gboolean sensitive = FALSE;
|
||||
|
||||
name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
|
||||
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group), name);
|
||||
g_free (name);
|
||||
|
||||
proc = gimp_plug_in_manager_history_nth (manager, i);
|
||||
|
||||
if (proc->menu_label)
|
||||
{
|
||||
label = dgettext (gimp_plug_in_procedure_get_locale_domain (proc),
|
||||
proc->menu_label);
|
||||
}
|
||||
else
|
||||
{
|
||||
label = gimp_plug_in_procedure_get_label (proc);
|
||||
}
|
||||
|
||||
/* see comment above */
|
||||
actual_action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
|
||||
GIMP_OBJECT (proc)->name);
|
||||
|
@ -547,7 +560,7 @@ plug_in_actions_history_changed (GimpPlugInManager *manager,
|
|||
"visible", TRUE,
|
||||
"sensitive", sensitive,
|
||||
"procedure", proc,
|
||||
"label", gimp_plug_in_procedure_get_label (proc),
|
||||
"label", label,
|
||||
"stock-id", gimp_plug_in_procedure_get_stock_id (proc),
|
||||
"tooltip", gimp_plug_in_procedure_get_blurb (proc),
|
||||
NULL);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
@ -187,7 +188,7 @@ vectors_new_last_vals_cmd_callback (GtkAction *action,
|
|||
new_vectors = gimp_vectors_new (image,
|
||||
vectors_name ? vectors_name : _("New Path"));
|
||||
|
||||
gimp_image_add_vectors (image, new_vectors, -1);
|
||||
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
|
||||
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
@ -200,7 +201,7 @@ vectors_raise_cmd_callback (GtkAction *action,
|
|||
GimpVectors *vectors;
|
||||
return_if_no_vectors (image, vectors, data);
|
||||
|
||||
gimp_image_raise_vectors (image, vectors);
|
||||
gimp_image_raise_vectors (image, vectors, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -224,7 +225,7 @@ vectors_lower_cmd_callback (GtkAction *action,
|
|||
GimpVectors *vectors;
|
||||
return_if_no_vectors (image, vectors, data);
|
||||
|
||||
gimp_image_lower_vectors (image, vectors);
|
||||
gimp_image_lower_vectors (image, vectors, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -251,7 +252,7 @@ vectors_duplicate_cmd_callback (GtkAction *action,
|
|||
|
||||
new_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
|
||||
G_TYPE_FROM_INSTANCE (vectors)));
|
||||
gimp_image_add_vectors (image, new_vectors, -1);
|
||||
gimp_image_add_vectors (image, new_vectors, -1, TRUE);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -263,7 +264,7 @@ vectors_delete_cmd_callback (GtkAction *action,
|
|||
GimpVectors *vectors;
|
||||
return_if_no_vectors (image, vectors, data);
|
||||
|
||||
gimp_image_remove_vectors (image, vectors);
|
||||
gimp_image_remove_vectors (image, vectors, TRUE, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -603,7 +604,7 @@ vectors_new_vectors_response (GtkWidget *widget,
|
|||
|
||||
new_vectors = gimp_vectors_new (options->image, vectors_name);
|
||||
|
||||
gimp_image_add_vectors (options->image, new_vectors, -1);
|
||||
gimp_image_add_vectors (options->image, new_vectors, -1, TRUE);
|
||||
|
||||
gimp_image_flush (options->image);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
@ -31,6 +32,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprojection.h"
|
||||
|
||||
#include "widgets/gimpactiongroup.h"
|
||||
#include "widgets/gimprender.h"
|
||||
|
@ -231,7 +233,14 @@ static const GimpToggleActionEntry view_toggle_actions[] =
|
|||
N_("Toggle fullscreen view"),
|
||||
G_CALLBACK (view_fullscreen_cmd_callback),
|
||||
FALSE,
|
||||
GIMP_HELP_VIEW_FULLSCREEN }
|
||||
GIMP_HELP_VIEW_FULLSCREEN },
|
||||
|
||||
{ "view-use-gegl", GIMP_STOCK_GEGL,
|
||||
"Use GEGL", NULL,
|
||||
"Use GEGL to create this window's projection",
|
||||
G_CALLBACK (view_use_gegl_cmd_callback),
|
||||
FALSE,
|
||||
NULL }
|
||||
};
|
||||
|
||||
static const GimpEnumActionEntry view_zoom_actions[] =
|
||||
|
@ -656,6 +665,7 @@ view_actions_update (GimpActionGroup *group,
|
|||
SET_SENSITIVE ("view-shrink-wrap", image);
|
||||
SET_SENSITIVE ("view-fullscreen", image);
|
||||
SET_ACTIVE ("view-fullscreen", display && fullscreen);
|
||||
SET_ACTIVE ("view-use-gegl", image && display->image->projection->use_gegl);
|
||||
|
||||
if (GIMP_IS_DISPLAY (group->user_data) ||
|
||||
GIMP_IS_GIMP (group->user_data))
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
@ -30,6 +31,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprojection.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
|
@ -134,27 +136,45 @@ view_zoom_cmd_callback (GtkAction *action,
|
|||
switch ((GimpActionSelectType) value)
|
||||
{
|
||||
case GIMP_ACTION_SELECT_FIRST:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT_MAX, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_OUT_MAX,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_LAST:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_IN_MAX, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_IN_MAX,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_PREVIOUS:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_OUT,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_NEXT:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_IN, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_IN,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_PREVIOUS:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_OUT_MORE, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_OUT_MORE,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
case GIMP_ACTION_SELECT_SKIP_NEXT:
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_IN_MORE, 0.0);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_IN_MORE,
|
||||
0.0,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -171,7 +191,10 @@ view_zoom_cmd_callback (GtkAction *action,
|
|||
/* scale = min * (max / min)**(i/n), i = 0..n */
|
||||
scale = pow (65536.0, scale / 512.0) / 256.0;
|
||||
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_TO, scale);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_TO,
|
||||
scale,
|
||||
GIMP_ZOOM_FOCUS_BEST_GUESS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +217,10 @@ view_zoom_explicit_cmd_callback (GtkAction *action,
|
|||
if (value != 0 /* not Other... */)
|
||||
{
|
||||
if (fabs (value - gimp_zoom_model_get_factor (shell->zoom)) > 0.0001)
|
||||
gimp_display_shell_scale (shell, GIMP_ZOOM_TO, (gdouble) value / 10000);
|
||||
gimp_display_shell_scale (shell,
|
||||
GIMP_ZOOM_TO,
|
||||
(gdouble) value / 10000,
|
||||
GIMP_ZOOM_FOCUS_IMAGE_CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -658,6 +684,25 @@ view_fullscreen_cmd_callback (GtkAction *action,
|
|||
gimp_display_shell_set_fullscreen (shell, active);
|
||||
}
|
||||
|
||||
void
|
||||
view_use_gegl_cmd_callback (GtkAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpDisplay *display;
|
||||
GimpDisplayShell *shell;
|
||||
gboolean active;
|
||||
return_if_no_image (image, data);
|
||||
return_if_no_display (display, data);
|
||||
|
||||
shell = GIMP_DISPLAY_SHELL (display->shell);
|
||||
|
||||
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||
|
||||
image->projection->use_gegl = active;
|
||||
gimp_display_shell_expose_full (shell);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
|
|
@ -87,5 +87,8 @@ void view_shrink_wrap_cmd_callback (GtkAction *action,
|
|||
void view_fullscreen_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
void view_use_gegl_cmd_callback (GtkAction *action,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __VIEW_COMMANDS_H__ */
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
@ -212,7 +213,7 @@ windows_actions_image_notify (GimpDisplay *display,
|
|||
entry.accelerator = NULL;
|
||||
entry.tooltip = NULL;
|
||||
entry.callback = G_CALLBACK (windows_show_display_cmd_callback);
|
||||
entry.help_id = GIMP_HELP_WINDOWS_SHOW_IMAGE_WINDOW;
|
||||
entry.help_id = NULL;
|
||||
|
||||
gimp_action_group_add_actions (group, &entry, 1);
|
||||
|
||||
|
@ -268,7 +269,8 @@ windows_actions_dock_added (GimpDialogFactory *factory,
|
|||
{
|
||||
GtkAction *action;
|
||||
GimpActionEntry entry;
|
||||
gchar *action_name = g_strdup_printf ("windows-dock-%04d", dock->ID);
|
||||
gchar *action_name = g_strdup_printf ("windows-dock-%04d",
|
||||
dock->ID);
|
||||
|
||||
entry.name = action_name;
|
||||
entry.stock_id = NULL;
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Base\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
noinst_LIBRARIES = libappbase.a
|
||||
|
||||
libappbase_a_SOURCES = \
|
||||
|
@ -63,21 +74,8 @@ libappbase_a_SOURCES = \
|
|||
tile-swap.c \
|
||||
tile-swap.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Base\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
|
||||
EXTRA_DIST = makefile.msc
|
||||
|
||||
|
||||
#
|
||||
# rules to generate built sources
|
||||
#
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
|
||||
/* public functions */
|
||||
|
||||
GPid
|
||||
gint
|
||||
get_pid (void)
|
||||
{
|
||||
return getpid ();
|
||||
return (gint) getpid ();
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define __BASE_H__
|
||||
|
||||
|
||||
GPid get_pid (void);
|
||||
gint get_pid (void);
|
||||
gint get_number_of_processors (void);
|
||||
guint64 get_physical_memory_size (void);
|
||||
|
||||
|
|
|
@ -67,9 +67,13 @@ colorize_calculate (Colorize *colorize)
|
|||
|
||||
gimp_hsl_to_rgb (&hsl, &rgb);
|
||||
|
||||
colorize->final_red_lookup[i] = i * rgb.r;
|
||||
colorize->final_green_lookup[i] = i * rgb.g;
|
||||
colorize->final_blue_lookup[i] = i * rgb.b;
|
||||
/* this used to read i * rgb.r,g,b in GIMP 2.4, but this produced
|
||||
* darkened results, multiplying with 255 is correct and preserves
|
||||
* the lightness unless modified with the slider.
|
||||
*/
|
||||
colorize->final_red_lookup[i] = 255.0 * rgb.r;
|
||||
colorize->final_green_lookup[i] = 255.0 * rgb.g;
|
||||
colorize->final_blue_lookup[i] = 255.0 * rgb.b;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ OBJECTS = \
|
|||
colorize.obj \
|
||||
cpercep.obj \
|
||||
curves.obj \
|
||||
desaturate.obj \
|
||||
gimphistogram.obj \
|
||||
gimplut.obj \
|
||||
hue-saturation.obj \
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
struct _PixelSurround
|
||||
{
|
||||
TileManager *mgr; /* tile manager to access tiles from */
|
||||
gint xmax; /* largest x coordinate in tile manager */
|
||||
gint ymax; /* largest y coordinate in tile manager */
|
||||
gint bpp; /* bytes per pixel in tile manager */
|
||||
gint w; /* width of pixel surround area */
|
||||
gint h; /* height of pixel surround area */
|
||||
|
@ -44,106 +46,73 @@ struct _PixelSurround
|
|||
gint rowstride; /* rowstride of buffers */
|
||||
guchar *bg; /* buffer filled with background color */
|
||||
guchar *buf; /* buffer used for combining tile data */
|
||||
PixelSurroundMode mode;
|
||||
};
|
||||
|
||||
static const guchar * pixel_surround_get_data (PixelSurround *surround,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *w,
|
||||
gint *h,
|
||||
gint *rowstride);
|
||||
|
||||
/* inlining this function gives a few percent speedup */
|
||||
static inline const guchar *
|
||||
pixel_surround_get_data (PixelSurround *surround,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *w,
|
||||
gint *h,
|
||||
gint *rowstride)
|
||||
{
|
||||
/* do we still have a tile lock that we can use? */
|
||||
if (surround->tile)
|
||||
{
|
||||
if (x < surround->tile_x || x >= surround->tile_x + surround->tile_w ||
|
||||
y < surround->tile_y || y >= surround->tile_y + surround->tile_h)
|
||||
{
|
||||
tile_release (surround->tile, FALSE);
|
||||
surround->tile = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* if not, try to get one for the target pixel */
|
||||
if (! surround->tile)
|
||||
{
|
||||
surround->tile = tile_manager_get_tile (surround->mgr, x, y, TRUE, FALSE);
|
||||
|
||||
if (surround->tile)
|
||||
{
|
||||
/* store offset and size of the locked tile */
|
||||
surround->tile_x = x & ~(TILE_WIDTH - 1);
|
||||
surround->tile_y = y & ~(TILE_HEIGHT - 1);
|
||||
surround->tile_w = tile_ewidth (surround->tile);
|
||||
surround->tile_h = tile_eheight (surround->tile);
|
||||
}
|
||||
}
|
||||
|
||||
if (surround->tile)
|
||||
{
|
||||
*w = surround->tile_x + surround->tile_w - x;
|
||||
*h = surround->tile_y + surround->tile_h - y;
|
||||
|
||||
*rowstride = surround->tile_w * surround->bpp;
|
||||
|
||||
return tile_data_pointer (surround->tile,
|
||||
x % TILE_WIDTH, y % TILE_HEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* return a pointer to a virtual background tile */
|
||||
if (x < 0)
|
||||
*w = MIN (- x, surround->w);
|
||||
else
|
||||
*w = surround->w;
|
||||
|
||||
if (y < 0)
|
||||
*h = MIN (- y, surround->h);
|
||||
else
|
||||
*h = surround->h;
|
||||
|
||||
*rowstride = surround->rowstride;
|
||||
|
||||
return surround->bg;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* pixel_surround_new:
|
||||
* @tiles: tile manager
|
||||
* @width: width of surround region
|
||||
* @height: height of surround region
|
||||
* @bg: color to use for pixels that are not covered by the tile manager
|
||||
* @mode: how to deal with pixels that are not covered by the tile manager
|
||||
*
|
||||
* PixelSurround provides you a contiguous read-only view of the area
|
||||
* surrounding a pixel. It is an efficient pixel access strategy for
|
||||
* interpolation algorithms.
|
||||
*
|
||||
* Return value: a new #PixelSurround.
|
||||
*/
|
||||
PixelSurround *
|
||||
pixel_surround_new (TileManager *tiles,
|
||||
gint width,
|
||||
gint height,
|
||||
const guchar bg[MAX_CHANNELS])
|
||||
pixel_surround_new (TileManager *tiles,
|
||||
gint width,
|
||||
gint height,
|
||||
PixelSurroundMode mode)
|
||||
{
|
||||
PixelSurround *surround;
|
||||
guchar *dest;
|
||||
gint pixels;
|
||||
|
||||
g_return_val_if_fail (tiles != NULL, NULL);
|
||||
g_return_val_if_fail (width < TILE_WIDTH, NULL);
|
||||
g_return_val_if_fail (height < TILE_WIDTH, NULL);
|
||||
|
||||
surround = g_slice_new0 (PixelSurround);
|
||||
|
||||
surround->mgr = tiles;
|
||||
surround->xmax = tile_manager_width (surround->mgr) - 1;
|
||||
surround->ymax = tile_manager_height (surround->mgr) - 1;
|
||||
surround->bpp = tile_manager_bpp (tiles);
|
||||
surround->w = width;
|
||||
surround->h = height;
|
||||
surround->rowstride = width * surround->bpp;
|
||||
surround->bg = g_new (guchar, surround->rowstride * height);
|
||||
surround->bg = g_new0 (guchar, surround->rowstride * height);
|
||||
surround->buf = g_new (guchar, surround->rowstride * height);
|
||||
surround->mode = mode;
|
||||
|
||||
dest = surround->bg;
|
||||
pixels = width * height;
|
||||
return surround;
|
||||
}
|
||||
|
||||
/**
|
||||
* pixel_surround_set_bg:
|
||||
* @surround: a #PixelSurround
|
||||
* @bg: background color
|
||||
*
|
||||
* This sets the color that the #PixelSurround uses when in
|
||||
* %PIXEL_SURROUND_BACKGROUND mode for pixels that are not covered by
|
||||
* the tile manager.
|
||||
*/
|
||||
void
|
||||
pixel_surround_set_bg (PixelSurround *surround,
|
||||
const guchar *bg)
|
||||
{
|
||||
guchar *dest = surround->bg;
|
||||
gint pixels = surround->w * surround->h;
|
||||
|
||||
while (pixels--)
|
||||
{
|
||||
|
@ -152,8 +121,6 @@ pixel_surround_new (TileManager *tiles,
|
|||
for (i = 0; i < surround->bpp; i++)
|
||||
*dest++ = bg[i];
|
||||
}
|
||||
|
||||
return surround;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -281,3 +248,173 @@ pixel_surround_destroy (PixelSurround *surround)
|
|||
|
||||
g_slice_free (PixelSurround, surround);
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
LEFT = 1 << 0,
|
||||
RIGHT = 1 << 1,
|
||||
TOP = 1 << 2,
|
||||
BOTTOM = 1 << 3
|
||||
};
|
||||
|
||||
static void
|
||||
pixel_surround_fill_row (PixelSurround *surround,
|
||||
const guchar *src,
|
||||
gint w)
|
||||
{
|
||||
guchar *dest = surround->bg;
|
||||
gint bytes = MIN (w, surround->w) * surround->bpp;
|
||||
gint rows = surround->h;
|
||||
|
||||
while (rows--)
|
||||
{
|
||||
memcpy (dest, src, bytes);
|
||||
dest += surround->rowstride;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pixel_surround_fill_col (PixelSurround *surround,
|
||||
const guchar *src,
|
||||
gint rowstride,
|
||||
gint h)
|
||||
{
|
||||
guchar *dest = surround->bg;
|
||||
gint cols = surround->w;
|
||||
gint rows = MIN (h, surround->h);
|
||||
|
||||
while (cols--)
|
||||
{
|
||||
const guchar *s = src;
|
||||
guchar *d = dest;
|
||||
gint r = rows;
|
||||
|
||||
while (r--)
|
||||
{
|
||||
memcpy (d, s, surround->bpp);
|
||||
|
||||
s += rowstride;
|
||||
d += surround->rowstride;
|
||||
}
|
||||
|
||||
dest += surround->bpp;
|
||||
}
|
||||
}
|
||||
|
||||
static const guchar *
|
||||
pixel_surround_get_data (PixelSurround *surround,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *w,
|
||||
gint *h,
|
||||
gint *rowstride)
|
||||
{
|
||||
/* do we still have a tile lock that we can use? */
|
||||
if (surround->tile)
|
||||
{
|
||||
if (x < surround->tile_x || x >= surround->tile_x + surround->tile_w ||
|
||||
y < surround->tile_y || y >= surround->tile_y + surround->tile_h)
|
||||
{
|
||||
tile_release (surround->tile, FALSE);
|
||||
surround->tile = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* if not, try to get one for the target pixel */
|
||||
if (! surround->tile)
|
||||
{
|
||||
surround->tile = tile_manager_get_tile (surround->mgr, x, y, TRUE, FALSE);
|
||||
|
||||
if (surround->tile)
|
||||
{
|
||||
/* store offset and size of the locked tile */
|
||||
surround->tile_x = x & ~(TILE_WIDTH - 1);
|
||||
surround->tile_y = y & ~(TILE_HEIGHT - 1);
|
||||
surround->tile_w = tile_ewidth (surround->tile);
|
||||
surround->tile_h = tile_eheight (surround->tile);
|
||||
}
|
||||
}
|
||||
|
||||
if (surround->tile)
|
||||
{
|
||||
*w = surround->tile_x + surround->tile_w - x;
|
||||
*h = surround->tile_y + surround->tile_h - y;
|
||||
|
||||
*rowstride = surround->tile_w * surround->bpp;
|
||||
|
||||
return tile_data_pointer (surround->tile, x, y);
|
||||
}
|
||||
|
||||
if (surround->mode == PIXEL_SURROUND_SMEAR)
|
||||
{
|
||||
const guchar *edata;
|
||||
gint ex = x;
|
||||
gint ey = y;
|
||||
gint ew, eh;
|
||||
gint estride;
|
||||
gint ecode = 0;
|
||||
|
||||
if (ex < 0)
|
||||
{
|
||||
ex = 0;
|
||||
ecode |= LEFT;
|
||||
}
|
||||
else if (ex > surround->xmax)
|
||||
{
|
||||
ex = surround->xmax;
|
||||
ecode |= RIGHT;
|
||||
}
|
||||
|
||||
if (ey < 0)
|
||||
{
|
||||
ey = 0;
|
||||
ecode |= TOP;
|
||||
}
|
||||
else if (ey > surround->ymax)
|
||||
{
|
||||
ey = surround->ymax;
|
||||
ecode |= BOTTOM;
|
||||
}
|
||||
|
||||
/* call ourselves with corrected coordinates */
|
||||
edata = pixel_surround_get_data (surround, ex, ey, &ew, &eh, &estride);
|
||||
|
||||
/* fill the virtual background tile */
|
||||
switch (ecode)
|
||||
{
|
||||
case (TOP | LEFT):
|
||||
case (TOP | RIGHT):
|
||||
case (BOTTOM | LEFT):
|
||||
case (BOTTOM | RIGHT):
|
||||
pixel_surround_set_bg (surround, edata);
|
||||
break;
|
||||
|
||||
case (TOP):
|
||||
case (BOTTOM):
|
||||
pixel_surround_fill_row (surround, edata, ew);
|
||||
break;
|
||||
|
||||
case (LEFT):
|
||||
case (RIGHT):
|
||||
pixel_surround_fill_col (surround, edata, estride, eh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* return a pointer to the virtual background tile */
|
||||
|
||||
if (x < 0)
|
||||
*w = MIN (- x, surround->w);
|
||||
else
|
||||
*w = surround->w;
|
||||
|
||||
if (y < 0)
|
||||
*h = MIN (- y, surround->h);
|
||||
else
|
||||
*h = surround->h;
|
||||
|
||||
*rowstride = surround->rowstride;
|
||||
|
||||
return surround->bg;
|
||||
}
|
||||
|
|
|
@ -24,24 +24,31 @@
|
|||
* region around a pixel in a tile manager
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PIXEL_SURROUND_SMEAR,
|
||||
PIXEL_SURROUND_BACKGROUND
|
||||
} PixelSurroundMode;
|
||||
|
||||
PixelSurround * pixel_surround_new (TileManager *tiles,
|
||||
gint width,
|
||||
gint height,
|
||||
const guchar bg[MAX_CHANNELS]);
|
||||
|
||||
PixelSurround * pixel_surround_new (TileManager *tiles,
|
||||
gint width,
|
||||
gint height,
|
||||
PixelSurroundMode mode);
|
||||
void pixel_surround_set_bg (PixelSurround *surround,
|
||||
const guchar *bg);
|
||||
|
||||
/* return a pointer to a buffer which contains all the surrounding pixels
|
||||
* strategy: if we are in the middle of a tile, use the tile storage
|
||||
* otherwise just copy into our own malloced buffer and return that
|
||||
*/
|
||||
const guchar * pixel_surround_lock (PixelSurround *surround,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *rowstride);
|
||||
const guchar * pixel_surround_lock (PixelSurround *surround,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *rowstride);
|
||||
|
||||
void pixel_surround_release (PixelSurround *surround);
|
||||
|
||||
void pixel_surround_destroy (PixelSurround *surround);
|
||||
void pixel_surround_release (PixelSurround *surround);
|
||||
void pixel_surround_destroy (PixelSurround *surround);
|
||||
|
||||
|
||||
#endif /* __PIXEL_SURROUND_H__ */
|
||||
|
|
|
@ -38,34 +38,32 @@ static void tile_cache_flush_internal (Tile *tile);
|
|||
static gboolean tile_idle_preswap (gpointer data);
|
||||
|
||||
|
||||
static gboolean initialize = TRUE;
|
||||
|
||||
typedef struct _TileList
|
||||
{
|
||||
Tile *first;
|
||||
Tile *last;
|
||||
} TileList;
|
||||
|
||||
static const gulong max_tile_size = TILE_WIDTH * TILE_HEIGHT * 4;
|
||||
static gulong cur_cache_size = 0;
|
||||
static gulong max_cache_size = 0;
|
||||
static gulong cur_cache_dirty = 0;
|
||||
static TileList clean_list = { NULL, NULL };
|
||||
static TileList dirty_list = { NULL, NULL };
|
||||
static guint idle_swapper = 0;
|
||||
static const gulong max_tile_size = TILE_WIDTH * TILE_HEIGHT * 4;
|
||||
static gulong cur_cache_size = 0;
|
||||
static gulong max_cache_size = 0;
|
||||
static gulong cur_cache_dirty = 0;
|
||||
static TileList clean_list = { NULL, NULL };
|
||||
static TileList dirty_list = { NULL, NULL };
|
||||
static guint idle_swapper = 0;
|
||||
|
||||
|
||||
#ifdef ENABLE_MP
|
||||
|
||||
static GStaticMutex tile_cache_mutex = G_STATIC_MUTEX_INIT;
|
||||
static GMutex *tile_cache_mutex = NULL;
|
||||
|
||||
#define CACHE_LOCK g_static_mutex_lock (&tile_cache_mutex)
|
||||
#define CACHE_UNLOCK g_static_mutex_unlock (&tile_cache_mutex)
|
||||
#define TILE_CACHE_LOCK g_mutex_lock (tile_cache_mutex)
|
||||
#define TILE_CACHE_UNLOCK g_mutex_unlock (tile_cache_mutex)
|
||||
|
||||
#else
|
||||
|
||||
#define CACHE_LOCK /* nothing */
|
||||
#define CACHE_UNLOCK /* nothing */
|
||||
#define TILE_CACHE_LOCK /* nothing */
|
||||
#define TILE_CACHE_UNLOCK /* nothing */
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -73,15 +71,16 @@ static GStaticMutex tile_cache_mutex = G_STATIC_MUTEX_INIT;
|
|||
void
|
||||
tile_cache_init (gulong tile_cache_size)
|
||||
{
|
||||
if (initialize)
|
||||
{
|
||||
initialize = FALSE;
|
||||
#ifdef ENABLE_MP
|
||||
g_return_if_fail (tile_cache_mutex == NULL);
|
||||
|
||||
clean_list.first = clean_list.last = NULL;
|
||||
dirty_list.first = dirty_list.last = NULL;
|
||||
tile_cache_mutex = g_mutex_new ();
|
||||
#endif
|
||||
|
||||
max_cache_size = tile_cache_size;
|
||||
}
|
||||
clean_list.first = clean_list.last = NULL;
|
||||
dirty_list.first = dirty_list.last = NULL;
|
||||
|
||||
max_cache_size = tile_cache_size;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -97,6 +96,11 @@ tile_cache_exit (void)
|
|||
g_warning ("tile cache not empty (%ld bytes left)", cur_cache_size);
|
||||
|
||||
tile_cache_set_size (0);
|
||||
|
||||
#ifdef ENABLE_MP
|
||||
g_mutex_free (tile_cache_mutex);
|
||||
tile_cache_mutex = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -105,7 +109,7 @@ tile_cache_insert (Tile *tile)
|
|||
TileList *list;
|
||||
TileList *newlist;
|
||||
|
||||
CACHE_LOCK;
|
||||
TILE_CACHE_LOCK;
|
||||
|
||||
if (! tile->data)
|
||||
goto out;
|
||||
|
@ -191,23 +195,23 @@ tile_cache_insert (Tile *tile)
|
|||
}
|
||||
|
||||
out:
|
||||
CACHE_UNLOCK;
|
||||
TILE_CACHE_UNLOCK;
|
||||
}
|
||||
|
||||
void
|
||||
tile_cache_flush (Tile *tile)
|
||||
{
|
||||
CACHE_LOCK;
|
||||
TILE_CACHE_LOCK;
|
||||
|
||||
tile_cache_flush_internal (tile);
|
||||
|
||||
CACHE_UNLOCK;
|
||||
TILE_CACHE_UNLOCK;
|
||||
}
|
||||
|
||||
void
|
||||
tile_cache_set_size (gulong cache_size)
|
||||
{
|
||||
CACHE_LOCK;
|
||||
TILE_CACHE_LOCK;
|
||||
|
||||
max_cache_size = cache_size;
|
||||
|
||||
|
@ -217,7 +221,7 @@ tile_cache_set_size (gulong cache_size)
|
|||
break;
|
||||
}
|
||||
|
||||
CACHE_UNLOCK;
|
||||
TILE_CACHE_UNLOCK;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -291,7 +295,7 @@ tile_idle_preswap (gpointer data)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
CACHE_LOCK;
|
||||
TILE_CACHE_LOCK;
|
||||
|
||||
if ((tile = dirty_list.first))
|
||||
{
|
||||
|
@ -317,7 +321,7 @@ tile_idle_preswap (gpointer data)
|
|||
cur_cache_dirty -= tile->size;
|
||||
}
|
||||
|
||||
CACHE_UNLOCK;
|
||||
TILE_CACHE_UNLOCK;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -35,14 +35,13 @@ TileManager *
|
|||
tile_manager_crop (TileManager *tiles,
|
||||
gint border)
|
||||
{
|
||||
PixelRegion PR;
|
||||
TileManager *new_tiles;
|
||||
gint bytes, alpha;
|
||||
gint x1, y1, x2, y2;
|
||||
gboolean found;
|
||||
gboolean empty;
|
||||
gpointer pr;
|
||||
const guchar black[MAX_CHANNELS] = { 0, 0, 0, 0 };
|
||||
PixelRegion region;
|
||||
TileManager *new_tiles;
|
||||
gint bytes, alpha;
|
||||
gint x1, y1, x2, y2;
|
||||
gboolean found;
|
||||
gboolean empty;
|
||||
gpointer pr;
|
||||
|
||||
g_return_val_if_fail (tiles != NULL, NULL);
|
||||
|
||||
|
@ -55,22 +54,22 @@ tile_manager_crop (TileManager *tiles,
|
|||
x2 = 0;
|
||||
y2 = 0;
|
||||
|
||||
pixel_region_init (&PR, tiles, 0, 0, x1, y1, FALSE);
|
||||
pixel_region_init (®ion, tiles, 0, 0, x1, y1, FALSE);
|
||||
|
||||
for (pr = pixel_regions_register (1, &PR);
|
||||
for (pr = pixel_regions_register (1, ®ion);
|
||||
pr != NULL;
|
||||
pr = pixel_regions_process (pr))
|
||||
{
|
||||
const guchar *data = PR.data + alpha;
|
||||
gint ex = PR.x + PR.w;
|
||||
gint ey = PR.y + PR.h;
|
||||
const guchar *data = region.data + alpha;
|
||||
gint ex = region.x + region.w;
|
||||
gint ey = region.y + region.h;
|
||||
gint x, y;
|
||||
|
||||
for (y = PR.y; y < ey; y++)
|
||||
for (y = region.y; y < ey; y++)
|
||||
{
|
||||
found = FALSE;
|
||||
|
||||
for (x = PR.x; x < ex; x++, data += bytes)
|
||||
for (x = region.x; x < ex; x++, data += bytes)
|
||||
if (*data)
|
||||
{
|
||||
if (x < x1)
|
||||
|
@ -129,22 +128,22 @@ tile_manager_crop (TileManager *tiles,
|
|||
pixel_region_init (&destPR, new_tiles,
|
||||
0, 0, new_width, border,
|
||||
TRUE);
|
||||
color_region (&destPR, black);
|
||||
clear_region (&destPR);
|
||||
|
||||
pixel_region_init (&destPR, new_tiles,
|
||||
0, border, border, (y2 - y1),
|
||||
TRUE);
|
||||
color_region (&destPR, black);
|
||||
clear_region (&destPR);
|
||||
|
||||
pixel_region_init (&destPR, new_tiles,
|
||||
new_width - border, border, border, (y2 - y1),
|
||||
TRUE);
|
||||
color_region (&destPR, black);
|
||||
clear_region (&destPR);
|
||||
|
||||
pixel_region_init (&destPR, new_tiles,
|
||||
0, new_height - border, new_width, border,
|
||||
TRUE);
|
||||
color_region (&destPR, black);
|
||||
clear_region (&destPR);
|
||||
}
|
||||
|
||||
pixel_region_init (&srcPR, tiles,
|
||||
|
|
|
@ -679,21 +679,21 @@ read_pixel_data (TileManager *tm,
|
|||
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
|
||||
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
|
||||
{
|
||||
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
|
||||
const guchar *s = tile_data_pointer (t, x, y);
|
||||
guchar *d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
|
||||
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, FALSE);
|
||||
const guchar *s = TILE_DATA_POINTER (tile, x, y);
|
||||
guchar *d = buffer + stride * (y - y1) + tm->bpp * (x - x1);
|
||||
guint rows, cols;
|
||||
guint srcstride;
|
||||
|
||||
rows = tile_eheight (t) - y % TILE_HEIGHT;
|
||||
rows = tile->eheight - y % TILE_HEIGHT;
|
||||
if (rows > (y2 - y + 1))
|
||||
rows = y2 - y + 1;
|
||||
|
||||
cols = tile_ewidth (t) - x % TILE_WIDTH;
|
||||
cols = tile->ewidth - x % TILE_WIDTH;
|
||||
if (cols > (x2 - x + 1))
|
||||
cols = x2 - x + 1;
|
||||
|
||||
srcstride = tile_ewidth (t) * tile_bpp (t);
|
||||
srcstride = tile->ewidth * tile->bpp;
|
||||
|
||||
while (rows--)
|
||||
{
|
||||
|
@ -703,7 +703,7 @@ read_pixel_data (TileManager *tm,
|
|||
d += stride;
|
||||
}
|
||||
|
||||
tile_release (t, FALSE);
|
||||
tile_release (tile, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -721,21 +721,21 @@ write_pixel_data (TileManager *tm,
|
|||
for (y = y1; y <= y2; y += TILE_HEIGHT - (y % TILE_HEIGHT))
|
||||
for (x = x1; x <= x2; x += TILE_WIDTH - (x % TILE_WIDTH))
|
||||
{
|
||||
Tile *t = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
|
||||
const guchar *s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
|
||||
guchar *d = tile_data_pointer (t, x, y);
|
||||
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
|
||||
const guchar *s = buffer + stride * (y - y1) + tm->bpp * (x - x1);
|
||||
guchar *d = TILE_DATA_POINTER (tile, x, y);
|
||||
guint rows, cols;
|
||||
guint dststride;
|
||||
|
||||
rows = tile_eheight (t) - y % TILE_HEIGHT;
|
||||
rows = tile->eheight - y % TILE_HEIGHT;
|
||||
if (rows > (y2 - y + 1))
|
||||
rows = y2 - y + 1;
|
||||
|
||||
cols = tile_ewidth (t) - x % TILE_WIDTH;
|
||||
cols = tile->ewidth - x % TILE_WIDTH;
|
||||
if (cols > (x2 - x + 1))
|
||||
cols = x2 - x + 1;
|
||||
|
||||
dststride = tile_ewidth (t) * tile_bpp (t);
|
||||
dststride = tile->ewidth * tile->bpp;
|
||||
|
||||
while (rows--)
|
||||
{
|
||||
|
@ -745,7 +745,7 @@ write_pixel_data (TileManager *tm,
|
|||
d += dststride;
|
||||
}
|
||||
|
||||
tile_release (t, TRUE);
|
||||
tile_release (tile, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -755,50 +755,49 @@ read_pixel_data_1 (TileManager *tm,
|
|||
gint y,
|
||||
guchar *buffer)
|
||||
{
|
||||
if (x >= 0 && y >= 0 && x < tm->width && y < tm->height)
|
||||
const gint num = tile_manager_get_tile_num (tm, x, y);
|
||||
|
||||
if (num < 0)
|
||||
return;
|
||||
|
||||
if (num != tm->cached_num) /* must fetch a new tile */
|
||||
{
|
||||
gint num = tile_manager_get_tile_num (tm, x, y);
|
||||
|
||||
if (num != tm->cached_num) /* must fetch a new tile */
|
||||
{
|
||||
Tile *tile;
|
||||
|
||||
if (tm->cached_tile)
|
||||
tile_release (tm->cached_tile, FALSE);
|
||||
|
||||
tm->cached_num = -1;
|
||||
tm->cached_tile = NULL;
|
||||
|
||||
/* use a temporary variable instead of assigning to
|
||||
* tm->cached_tile directly to make sure tm->cached_num
|
||||
* and tm->cached_tile are always in a consistent state.
|
||||
* (the requested tile might be invalid and needs to be
|
||||
* validated, which would call tile_manager_get() recursively,
|
||||
* which in turn would clear the cached tile) See bug #472770.
|
||||
*/
|
||||
tile = tile_manager_get (tm, num, TRUE, FALSE);
|
||||
|
||||
tm->cached_num = num;
|
||||
tm->cached_tile = tile;
|
||||
}
|
||||
Tile *tile;
|
||||
|
||||
if (tm->cached_tile)
|
||||
{
|
||||
const guchar *src = tile_data_pointer (tm->cached_tile, x, y);
|
||||
tile_release (tm->cached_tile, FALSE);
|
||||
|
||||
switch (tm->bpp)
|
||||
{
|
||||
case 4:
|
||||
*buffer++ = *src++;
|
||||
case 3:
|
||||
*buffer++ = *src++;
|
||||
case 2:
|
||||
*buffer++ = *src++;
|
||||
case 1:
|
||||
*buffer++ = *src++;
|
||||
}
|
||||
}
|
||||
tm->cached_num = -1;
|
||||
tm->cached_tile = NULL;
|
||||
|
||||
/* use a temporary variable instead of assigning to
|
||||
* tm->cached_tile directly to make sure tm->cached_num
|
||||
* and tm->cached_tile are always in a consistent state.
|
||||
* (the requested tile might be invalid and needs to be
|
||||
* validated, which would call tile_manager_get() recursively,
|
||||
* which in turn would clear the cached tile) See bug #472770.
|
||||
*/
|
||||
tile = tile_manager_get (tm, num, TRUE, FALSE);
|
||||
|
||||
tm->cached_num = num;
|
||||
tm->cached_tile = tile;
|
||||
}
|
||||
|
||||
{
|
||||
const guchar *src = TILE_DATA_POINTER (tm->cached_tile, x, y);
|
||||
|
||||
switch (tm->bpp)
|
||||
{
|
||||
case 4:
|
||||
*buffer++ = *src++;
|
||||
case 3:
|
||||
*buffer++ = *src++;
|
||||
case 2:
|
||||
*buffer++ = *src++;
|
||||
case 1:
|
||||
*buffer++ = *src++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -808,7 +807,7 @@ write_pixel_data_1 (TileManager *tm,
|
|||
const guchar *buffer)
|
||||
{
|
||||
Tile *tile = tile_manager_get_tile (tm, x, y, TRUE, TRUE);
|
||||
guchar *dest = tile_data_pointer (tile, x, y);
|
||||
guchar *dest = TILE_DATA_POINTER (tile, x, y);
|
||||
|
||||
switch (tm->bpp)
|
||||
{
|
||||
|
|
|
@ -77,4 +77,11 @@ struct _Tile
|
|||
};
|
||||
|
||||
|
||||
/* tile_data_pointer() as a macro so that it can be inlined */
|
||||
|
||||
#define TILE_DATA_POINTER(tile,x,y) \
|
||||
((tile)->data + \
|
||||
(((y) % TILE_HEIGHT) * (tile)->ewidth + ((x) % TILE_WIDTH)) * (tile)->bpp)
|
||||
|
||||
|
||||
#endif /* __TILE_PRIVATE_H__ */
|
||||
|
|
|
@ -53,7 +53,7 @@ static gint tile_exist_count = 0;
|
|||
#endif
|
||||
|
||||
|
||||
static void tile_destroy (Tile *tile);
|
||||
static void tile_destroy (Tile *tile);
|
||||
|
||||
|
||||
Tile *
|
||||
|
@ -333,9 +333,7 @@ tile_data_pointer (Tile *tile,
|
|||
gint xoff,
|
||||
gint yoff)
|
||||
{
|
||||
gsize offset = (yoff % TILE_HEIGHT) * tile->ewidth + (xoff % TILE_WIDTH);
|
||||
|
||||
return (gpointer) (tile->data + offset * tile->bpp);
|
||||
return TILE_DATA_POINTER (tile, xoff, yoff);
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
@ -102,7 +102,7 @@ pixel_format=[
|
|||
def mode_name(mode):
|
||||
s = string.replace(mode.lower(), "gimp_composite_", "")
|
||||
return (s)
|
||||
|
||||
|
||||
def pixel_depth_name(pixel_format):
|
||||
s = string.replace(pixel_format.lower(), "gimp_pixelformat_", "")
|
||||
return (s)
|
||||
|
@ -135,7 +135,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
|
|||
|
||||
if len(function_table) < 1:
|
||||
return;
|
||||
|
||||
|
||||
print >>fpout, 'static const struct install_table {'
|
||||
print >>fpout, ' GimpCompositeOperation mode;'
|
||||
print >>fpout, ' GimpPixelFormat A;'
|
||||
|
@ -148,7 +148,7 @@ def print_function_table(fpout, name, function_table, requirements=[]):
|
|||
for r in requirements:
|
||||
print >>fpout, '#if %s' % (r)
|
||||
pass
|
||||
|
||||
|
||||
for mode in composite_modes:
|
||||
for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
|
||||
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
|
||||
|
@ -168,9 +168,9 @@ def print_function_table(fpout, name, function_table, requirements=[]):
|
|||
|
||||
print >>fpout, ' { 0, 0, 0, 0, NULL }'
|
||||
print >>fpout, '};'
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
def print_function_table_name(fpout, name, function_table):
|
||||
|
||||
print >>fpout, ''
|
||||
|
@ -197,9 +197,9 @@ def print_function_table_name(fpout, name, function_table):
|
|||
pass
|
||||
|
||||
print >>fpout, '};\n'
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
def load_function_table(filename):
|
||||
nmx = ns.nmx(filename)
|
||||
|
||||
|
@ -210,12 +210,12 @@ def load_function_table(filename):
|
|||
for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
|
||||
for D in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format):
|
||||
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
|
||||
|
||||
|
||||
for a in ["GIMP_PIXELFORMAT_ANY", A]:
|
||||
for b in ["GIMP_PIXELFORMAT_ANY", B]:
|
||||
for d in ["GIMP_PIXELFORMAT_ANY", D]:
|
||||
key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(a), pixel_depth_name(b), pixel_depth_name(d))
|
||||
|
||||
|
||||
f = nmx.exports_re(key + ".*")
|
||||
if f != None: gimp_composite_function["%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))] = [f]
|
||||
pass
|
||||
|
@ -231,7 +231,7 @@ def load_function_table(filename):
|
|||
|
||||
def merge_function_tables(tables):
|
||||
main_table = copy.deepcopy(tables[0][1])
|
||||
|
||||
|
||||
for t in tables[1:]:
|
||||
#print >>sys.stderr, t[0]
|
||||
for mode in composite_modes:
|
||||
|
@ -248,7 +248,7 @@ def merge_function_tables(tables):
|
|||
pass
|
||||
pass
|
||||
pass
|
||||
|
||||
|
||||
return (main_table)
|
||||
|
||||
|
||||
|
@ -281,7 +281,7 @@ def gimp_composite_regression(fpout, function_tables, options):
|
|||
for r in options.requires:
|
||||
print >>fpout, '#if %s' % (r)
|
||||
pass
|
||||
|
||||
|
||||
print >>fpout, ' GimpCompositeContext generic_ctx;'
|
||||
print >>fpout, ' GimpCompositeContext special_ctx;'
|
||||
print >>fpout, ' double ft0;'
|
||||
|
@ -349,11 +349,11 @@ def gimp_composite_regression(fpout, function_tables, options):
|
|||
|
||||
print >>fpout, ' gimp_composite_context_init (&generic_ctx, %s, %s, %s, %s, %s, n_pixels, (unsigned char *) %sA, (unsigned char *) %sB, (unsigned char *) %sB, (unsigned char *) %sD1);' % (
|
||||
mode, A, B, D, D, pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D), pixel_depth_name(D))
|
||||
|
||||
|
||||
print >>fpout, ' ft0 = gimp_composite_regression_time_function (iterations, %s, &generic_ctx);' % ("gimp_composite_dispatch")
|
||||
print >>fpout, ' ft1 = gimp_composite_regression_time_function (iterations, %s, &special_ctx);' % (generic_table[key][0])
|
||||
print >>fpout, ' if (gimp_composite_regression_compare_contexts ("%s", &generic_ctx, &special_ctx))' % (mode_name(mode))
|
||||
|
||||
|
||||
print >>fpout, ' {'
|
||||
print >>fpout, ' printf("%s_%s_%s_%s failed\\n");' % (mode_name(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D))
|
||||
print >>fpout, ' return (1);'
|
||||
|
@ -364,11 +364,11 @@ def gimp_composite_regression(fpout, function_tables, options):
|
|||
pass
|
||||
pass
|
||||
pass
|
||||
|
||||
|
||||
for r in options.requires:
|
||||
print >>fpout, '#endif'
|
||||
pass
|
||||
|
||||
|
||||
print >>fpout, ' return (0);'
|
||||
print >>fpout, '}'
|
||||
|
||||
|
@ -434,7 +434,7 @@ def gimp_composite_installer_install2(fpout, name, function_table, requirements=
|
|||
else:
|
||||
print >>fpout, ' /* nothing to do */'
|
||||
pass
|
||||
|
||||
|
||||
print >>fpout, ''
|
||||
print >>fpout, ' return (FALSE);'
|
||||
print >>fpout, '}'
|
||||
|
@ -499,7 +499,7 @@ def gimp_composite_hfile(fpout, name, function_table):
|
|||
print >>fpout, 'void %s_install (void);' % (functionnameify(name))
|
||||
print >>fpout, ''
|
||||
print >>fpout, 'typedef void (*%s_table[%s][%s][%s][%s]);' % (functionnameify(name), "GIMP_COMPOSITE_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N", "GIMP_PIXELFORMAT_N")
|
||||
|
||||
|
||||
return
|
||||
|
||||
def gimp_composite_cfile(fpout, name, function_table, requirements=[], cpu_feature=[]):
|
||||
|
|
|
@ -42,7 +42,7 @@ class nmx:
|
|||
def __init__(self, objfile=None):
|
||||
self.objects = dict()
|
||||
self.filename = None
|
||||
|
||||
|
||||
if objfile != None:
|
||||
self.update(objfile)
|
||||
pass
|
||||
|
@ -71,7 +71,7 @@ class nmx:
|
|||
pass
|
||||
|
||||
object = objfile
|
||||
|
||||
|
||||
for (type, symbol) in symbols:
|
||||
if not self.objects.has_key(object):
|
||||
self.objects.update({ object : dict({ "exports" : dict(), "imports" : dict() }) })
|
||||
|
|
|
@ -7,6 +7,18 @@ libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
|
|||
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
|
||||
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Config\" \
|
||||
-DGIMP_APP_VERSION_STRING=\"$(GIMP_APP_VERSION)\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GDK_PIXBUF_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
noinst_LIBRARIES = libappconfig.a
|
||||
|
||||
libappconfig_a_SOURCES = \
|
||||
|
@ -39,20 +51,6 @@ libappconfig_a_SOURCES = \
|
|||
gimpxmlparser.c \
|
||||
gimpxmlparser.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Config\" \
|
||||
-DGIMP_APP_VERSION_STRING=\"$(GIMP_APP_VERSION)\"
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GDK_PIXBUF_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
|
||||
EXTRA_PROGRAMS = test-config
|
||||
|
||||
EXTRA_DIST = makefile.msc
|
||||
|
@ -104,5 +102,4 @@ test_config_LDADD = \
|
|||
$(GEGL_LIBS) \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
|
||||
CLEANFILES = $(EXTRA_PROGRAMS) foorc
|
||||
|
|
|
@ -48,7 +48,10 @@ enum
|
|||
PROP_TEMP_PATH,
|
||||
PROP_SWAP_PATH,
|
||||
PROP_NUM_PROCESSORS,
|
||||
PROP_TILE_CACHE_SIZE
|
||||
PROP_TILE_CACHE_SIZE,
|
||||
|
||||
/* ignored, only for backward compatibility: */
|
||||
PROP_STINGY_MEMORY_USE
|
||||
};
|
||||
|
||||
|
||||
|
@ -107,6 +110,12 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
|||
1 << 30, /* 1GB */
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_CONFIRM);
|
||||
|
||||
/* only for backward compatibility: */
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_STINGY_MEMORY_USE,
|
||||
"stingy-memory-use", NULL,
|
||||
FALSE,
|
||||
GIMP_CONFIG_PARAM_IGNORE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -150,6 +159,10 @@ gimp_base_config_set_property (GObject *object,
|
|||
base_config->tile_cache_size = g_value_get_uint64 (value);
|
||||
break;
|
||||
|
||||
case PROP_STINGY_MEMORY_USE:
|
||||
/* ignored */
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
@ -179,6 +192,10 @@ gimp_base_config_get_property (GObject *object,
|
|||
g_value_set_uint64 (value, base_config->tile_cache_size);
|
||||
break;
|
||||
|
||||
case PROP_STINGY_MEMORY_USE:
|
||||
/* ignored */
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
|
|
@ -363,9 +363,8 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
|||
/* not serialized */
|
||||
g_object_class_install_property (object_class, PROP_USE_GEGL,
|
||||
g_param_spec_boolean ("use-gegl",
|
||||
"Use GEGL",
|
||||
"Use GEGL",
|
||||
TRUE,
|
||||
"Use GEGL", NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ enum
|
|||
PROP_TOOLBOX_COLOR_AREA,
|
||||
PROP_TOOLBOX_FOO_AREA,
|
||||
PROP_TOOLBOX_IMAGE_AREA,
|
||||
PROP_TOOLBOX_WILBER,
|
||||
PROP_THEME_PATH,
|
||||
PROP_THEME,
|
||||
PROP_USE_HELP,
|
||||
|
@ -82,7 +83,12 @@ enum
|
|||
PROP_TOOLBOX_WINDOW_HINT,
|
||||
PROP_DOCK_WINDOW_HINT,
|
||||
PROP_TRANSIENT_DOCKS,
|
||||
PROP_CURSOR_FORMAT
|
||||
PROP_CURSOR_FORMAT,
|
||||
|
||||
/* ignored, only for backward compatibility: */
|
||||
PROP_INFO_WINDOW_PER_DISPLAY,
|
||||
PROP_SHOW_TOOL_TIPS,
|
||||
PROP_SHOW_TIPS
|
||||
};
|
||||
|
||||
|
||||
|
@ -196,6 +202,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
TOOLBOX_IMAGE_AREA_BLURB,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_WILBER,
|
||||
"toolbox-wilber",
|
||||
TOOLBOX_WILBER_BLURB,
|
||||
TRUE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
path = gimp_config_build_data_path ("themes");
|
||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH,
|
||||
"theme-path", THEME_PATH_BLURB,
|
||||
|
@ -262,6 +273,24 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
GIMP_TYPE_CURSOR_FORMAT,
|
||||
GIMP_CURSOR_FORMAT_PIXBUF,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
/* only for backward compatibility: */
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
|
||||
"info-window-per-display",
|
||||
NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_IGNORE);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TOOL_TIPS,
|
||||
"show-tool-tips", NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_IGNORE);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_TIPS,
|
||||
"show-tips", NULL,
|
||||
FALSE,
|
||||
GIMP_PARAM_STATIC_STRINGS |
|
||||
GIMP_CONFIG_PARAM_IGNORE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -347,7 +376,10 @@ gimp_gui_config_set_property (GObject *object,
|
|||
case PROP_TOOLBOX_IMAGE_AREA:
|
||||
gui_config->toolbox_image_area = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_THEME_PATH:
|
||||
case PROP_TOOLBOX_WILBER:
|
||||
gui_config->toolbox_wilber = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_THEME_PATH:
|
||||
g_free (gui_config->theme_path);
|
||||
gui_config->theme_path = g_value_dup_string (value);
|
||||
break;
|
||||
|
@ -392,6 +424,12 @@ gimp_gui_config_set_property (GObject *object,
|
|||
gui_config->cursor_format = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_INFO_WINDOW_PER_DISPLAY:
|
||||
case PROP_SHOW_TOOL_TIPS:
|
||||
case PROP_SHOW_TIPS:
|
||||
/* ignored */
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
@ -462,6 +500,9 @@ gimp_gui_config_get_property (GObject *object,
|
|||
case PROP_TOOLBOX_IMAGE_AREA:
|
||||
g_value_set_boolean (value, gui_config->toolbox_image_area);
|
||||
break;
|
||||
case PROP_TOOLBOX_WILBER:
|
||||
g_value_set_boolean (value, gui_config->toolbox_wilber);
|
||||
break;
|
||||
case PROP_THEME_PATH:
|
||||
g_value_set_string (value, gui_config->theme_path);
|
||||
break;
|
||||
|
@ -502,6 +543,12 @@ gimp_gui_config_get_property (GObject *object,
|
|||
g_value_set_enum (value, gui_config->cursor_format);
|
||||
break;
|
||||
|
||||
case PROP_INFO_WINDOW_PER_DISPLAY:
|
||||
case PROP_SHOW_TOOL_TIPS:
|
||||
case PROP_SHOW_TIPS:
|
||||
/* ignored */
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
|
|
|
@ -58,6 +58,7 @@ struct _GimpGuiConfig
|
|||
gboolean toolbox_color_area;
|
||||
gboolean toolbox_foo_area;
|
||||
gboolean toolbox_image_area;
|
||||
gboolean toolbox_wilber;
|
||||
gchar *theme_path;
|
||||
gchar *theme;
|
||||
gboolean use_help;
|
||||
|
|
|
@ -386,9 +386,17 @@ N_("When the amount of pixel data exceeds this limit, GIMP will start to " \
|
|||
"work on images that wouldn't fit into memory otherwise. If you have a " \
|
||||
"lot of RAM, you may want to set this to a higher value.")
|
||||
|
||||
#define TOOLBOX_COLOR_AREA_BLURB NULL
|
||||
#define TOOLBOX_FOO_AREA_BLURB NULL
|
||||
#define TOOLBOX_IMAGE_AREA_BLURB NULL
|
||||
#define TOOLBOX_COLOR_AREA_BLURB \
|
||||
N_("Show the current foreground and background colors in the toolbox.")
|
||||
|
||||
#define TOOLBOX_FOO_AREA_BLURB \
|
||||
N_("Show the currently selected brush, pattern and gradient in the toolbox.")
|
||||
|
||||
#define TOOLBOX_IMAGE_AREA_BLURB \
|
||||
N_("Show the currently active image in the toolbox.")
|
||||
|
||||
#define TOOLBOX_WILBER_BLURB \
|
||||
"Show the GIMP mascot at the top of the toolbox."
|
||||
|
||||
#define TOOLBOX_WINDOW_HINT_BLURB \
|
||||
N_("The window type hint that is set on the toolbox. This may affect " \
|
||||
|
|
|
@ -51,8 +51,8 @@ gimp_rc_deserialize (GimpConfig *config,
|
|||
guint i;
|
||||
guint scope_id;
|
||||
guint old_scope_id;
|
||||
GTokenType token;
|
||||
GTokenType next;
|
||||
GTokenType token;
|
||||
GTokenType next;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONFIG (config), FALSE);
|
||||
|
||||
|
@ -86,9 +86,8 @@ gimp_rc_deserialize (GimpConfig *config,
|
|||
{
|
||||
next = g_scanner_peek_next_token (scanner);
|
||||
|
||||
if (G_UNLIKELY (next != token &&
|
||||
! (token == G_TOKEN_SYMBOL &&
|
||||
next == G_TOKEN_IDENTIFIER)))
|
||||
if (G_UNLIKELY (next != token && ! (token == G_TOKEN_SYMBOL &&
|
||||
next == G_TOKEN_IDENTIFIER)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ INCLUDES = \
|
|||
# -DG_DISABLE_CAST_CHECKS
|
||||
|
||||
DEFINES = \
|
||||
-DG_LOG_DOMAIN=\"Gimp-Config\"
|
||||
-DG_LOG_DOMAIN=\"Gimp-Config\" \
|
||||
$(GIMP_VERSION_DEFINES)
|
||||
|
||||
all : \
|
||||
$(PRJ_TOP)\config.h \
|
||||
|
|
|
@ -9,10 +9,9 @@ INCLUDES = \
|
|||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/app \
|
||||
-I$(top_srcdir)/app \
|
||||
$(GDK_PIXBUF_CFLAGS) \
|
||||
$(CAIRO_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
$(GDK_PIXBUF_CFLAGS) \
|
||||
-I$(includedir)
|
||||
|
||||
noinst_LIBRARIES = libappcore.a
|
||||
|
@ -157,6 +156,8 @@ libappcore_a_sources = \
|
|||
gimpdrawable-transform.h \
|
||||
gimpdrawablemodundo.c \
|
||||
gimpdrawablemodundo.h \
|
||||
gimpdrawablestack.c \
|
||||
gimpdrawablestack.h \
|
||||
gimpdrawableundo.c \
|
||||
gimpdrawableundo.h \
|
||||
gimpfilteredcontainer.c \
|
||||
|
|
|
@ -71,6 +71,7 @@ typedef struct _GimpContainer GimpContainer;
|
|||
typedef struct _GimpFilteredContainer GimpFilteredContainer;
|
||||
typedef struct _GimpList GimpList;
|
||||
typedef struct _GimpDocumentList GimpDocumentList;
|
||||
typedef struct _GimpDrawableStack GimpDrawableStack;
|
||||
typedef struct _GimpToolPresets GimpToolPresets;
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
|
@ -272,7 +272,7 @@ gimp_edit_paste (GimpImage *image,
|
|||
if (drawable)
|
||||
floating_sel_attach (layer, drawable);
|
||||
else
|
||||
gimp_image_add_layer (image, layer, 0);
|
||||
gimp_image_add_layer (image, layer, 0, TRUE);
|
||||
|
||||
/* end the group undo */
|
||||
gimp_image_undo_group_end (image);
|
||||
|
@ -332,7 +332,7 @@ gimp_edit_paste_as_new (Gimp *gimp,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
gimp_image_add_layer (image, layer, 0);
|
||||
gimp_image_add_layer (image, layer, 0, TRUE);
|
||||
|
||||
gimp_image_undo_enable (image);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ gimp_modules_unload (Gimp *gimp)
|
|||
{
|
||||
GimpConfigWriter *writer;
|
||||
GString *str;
|
||||
gchar *p;
|
||||
const gchar *p;
|
||||
gchar *filename;
|
||||
GError *error = NULL;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
@ -117,51 +117,50 @@ static inline void normalize_coords (const gint coords,
|
|||
gdouble *u,
|
||||
gdouble *v);
|
||||
|
||||
static inline gboolean supersample_dtest (gdouble u0,
|
||||
gdouble v0,
|
||||
gdouble u1,
|
||||
gdouble v1,
|
||||
gdouble u2,
|
||||
gdouble v2,
|
||||
gdouble u3,
|
||||
gdouble v3);
|
||||
static inline gboolean supersample_dtest (const gdouble u0,
|
||||
const gdouble v0,
|
||||
const gdouble u1,
|
||||
const gdouble v1,
|
||||
const gdouble u2,
|
||||
const gdouble v2,
|
||||
const gdouble u3,
|
||||
const gdouble v3);
|
||||
|
||||
static void sample_adapt (TileManager *tm,
|
||||
gdouble uc,
|
||||
gdouble vc,
|
||||
gdouble u0,
|
||||
gdouble v0,
|
||||
gdouble u1,
|
||||
gdouble v1,
|
||||
gdouble u2,
|
||||
gdouble v2,
|
||||
gdouble u3,
|
||||
gdouble v3,
|
||||
gint level,
|
||||
static void sample_adapt (PixelSurround *surround,
|
||||
const gdouble uc,
|
||||
const gdouble vc,
|
||||
const gdouble u0,
|
||||
const gdouble v0,
|
||||
const gdouble u1,
|
||||
const gdouble v1,
|
||||
const gdouble u2,
|
||||
const gdouble v2,
|
||||
const gdouble u3,
|
||||
const gdouble v3,
|
||||
const gint level,
|
||||
guchar *color,
|
||||
const guchar *bg_color,
|
||||
gint bpp,
|
||||
gint alpha);
|
||||
const gint bpp,
|
||||
const gint alpha);
|
||||
|
||||
static void sample_linear (PixelSurround *surround,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha);
|
||||
const gint bytes,
|
||||
const gint alpha);
|
||||
static void sample_cubic (PixelSurround *surround,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha);
|
||||
const gint bytes,
|
||||
const gint alpha);
|
||||
static void sample_lanczos (PixelSurround *surround,
|
||||
const gfloat *lanczos,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha);
|
||||
const gint bytes,
|
||||
const gint alpha);
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
@ -394,7 +393,8 @@ gimp_transform_region_linear (TileManager *orig_tiles,
|
|||
gint n;
|
||||
gpointer pr;
|
||||
|
||||
surround = pixel_surround_new (orig_tiles, 2, 2, bg_color);
|
||||
surround = pixel_surround_new (orig_tiles, 2, 2, PIXEL_SURROUND_BACKGROUND);
|
||||
pixel_surround_set_bg (surround, bg_color);
|
||||
|
||||
uinc = m->coeff[0][0];
|
||||
vinc = m->coeff[1][0];
|
||||
|
@ -431,14 +431,14 @@ gimp_transform_region_linear (TileManager *orig_tiles,
|
|||
if (supersample_dtest (u[1], v[1], u[2], v[2],
|
||||
u[3], v[3], u[4], v[4]))
|
||||
{
|
||||
sample_adapt (orig_tiles,
|
||||
sample_adapt (surround,
|
||||
u[0] - u1, v[0] - v1,
|
||||
u[1] - u1, v[1] - v1,
|
||||
u[2] - u1, v[2] - v1,
|
||||
u[3] - u1, v[3] - v1,
|
||||
u[4] - u1, v[4] - v1,
|
||||
recursion_level,
|
||||
d, bg_color, destPR->bytes, alpha);
|
||||
d, destPR->bytes, alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -496,7 +496,8 @@ gimp_transform_region_cubic (TileManager *orig_tiles,
|
|||
gint n;
|
||||
gpointer pr;
|
||||
|
||||
surround = pixel_surround_new (orig_tiles, 4, 4, bg_color);
|
||||
surround = pixel_surround_new (orig_tiles, 4, 4, PIXEL_SURROUND_BACKGROUND);
|
||||
pixel_surround_set_bg (surround, bg_color);
|
||||
|
||||
uinc = m->coeff[0][0];
|
||||
vinc = m->coeff[1][0];
|
||||
|
@ -532,14 +533,14 @@ gimp_transform_region_cubic (TileManager *orig_tiles,
|
|||
if (supersample_dtest (u[1], v[1], u[2], v[2],
|
||||
u[3], v[3], u[4], v[4]))
|
||||
{
|
||||
sample_adapt (orig_tiles,
|
||||
sample_adapt (surround,
|
||||
u[0] - u1, v[0] - v1,
|
||||
u[1] - u1, v[1] - v1,
|
||||
u[2] - u1, v[2] - v1,
|
||||
u[3] - u1, v[3] - v1,
|
||||
u[4] - u1, v[4] - v1,
|
||||
recursion_level,
|
||||
d, bg_color, destPR->bytes, alpha);
|
||||
d, destPR->bytes, alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -599,7 +600,9 @@ gimp_transform_region_lanczos (TileManager *orig_tiles,
|
|||
gpointer pr;
|
||||
|
||||
surround = pixel_surround_new (orig_tiles,
|
||||
LANCZOS_WIDTH2, LANCZOS_WIDTH2, bg_color);
|
||||
LANCZOS_WIDTH2, LANCZOS_WIDTH2,
|
||||
PIXEL_SURROUND_BACKGROUND);
|
||||
pixel_surround_set_bg (surround, bg_color);
|
||||
|
||||
/* allocate and fill lanczos lookup table */
|
||||
lanczos = create_lanczos_lookup ();
|
||||
|
@ -638,14 +641,14 @@ gimp_transform_region_lanczos (TileManager *orig_tiles,
|
|||
if (supersample_dtest (u[1], v[1], u[2], v[2],
|
||||
u[3], v[3], u[4], v[4]))
|
||||
{
|
||||
sample_adapt (orig_tiles,
|
||||
sample_adapt (surround,
|
||||
u[0] - u1, v[0] - v1,
|
||||
u[1] - u1, v[1] - v1,
|
||||
u[2] - u1, v[2] - v1,
|
||||
u[3] - u1, v[3] - v1,
|
||||
u[4] - u1, v[4] - v1,
|
||||
recursion_level,
|
||||
d, bg_color, destPR->bytes, alpha);
|
||||
d, destPR->bytes, alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -685,8 +688,8 @@ gimp_transform_region_lanczos (TileManager *orig_tiles,
|
|||
|
||||
static inline void
|
||||
untransform_coords (const GimpMatrix3 *m,
|
||||
gint x,
|
||||
gint y,
|
||||
const gint x,
|
||||
const gint y,
|
||||
gdouble *tu,
|
||||
gdouble *tv,
|
||||
gdouble *tw)
|
||||
|
@ -751,16 +754,16 @@ normalize_coords (const gint coords,
|
|||
*/
|
||||
static void
|
||||
sample_linear (PixelSurround *surround,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha)
|
||||
const gint bytes,
|
||||
const gint alpha)
|
||||
{
|
||||
gdouble a_val, a_recip;
|
||||
gint i;
|
||||
gint iu = floor (u);
|
||||
gint iv = floor (v);
|
||||
const gint iu = floor (u);
|
||||
const gint iv = floor (v);
|
||||
gint rowstride;
|
||||
gdouble du, dv;
|
||||
const guchar *alphachan;
|
||||
|
@ -835,56 +838,42 @@ sample_linear (PixelSurround *surround,
|
|||
bilinear interpolation of a fixed point pixel
|
||||
*/
|
||||
static void
|
||||
sample_bi (TileManager *tm,
|
||||
gint x,
|
||||
gint y,
|
||||
guchar *color,
|
||||
const guchar *bg_color,
|
||||
gint bpp,
|
||||
gint alpha)
|
||||
sample_bi (PixelSurround *surround,
|
||||
const gint x,
|
||||
const gint y,
|
||||
guchar *color,
|
||||
const gint bpp,
|
||||
const gint alpha)
|
||||
{
|
||||
guchar C[4][4];
|
||||
gint i;
|
||||
gint xscale = (x & (FIXED_UNIT-1));
|
||||
gint yscale = (y & (FIXED_UNIT-1));
|
||||
|
||||
gint x0 = x >> FIXED_SHIFT;
|
||||
gint y0 = y >> FIXED_SHIFT;
|
||||
gint x1 = x0 + 1;
|
||||
gint y1 = y0 + 1;
|
||||
|
||||
|
||||
/* fill the color with default values, since read_pixel_data_1
|
||||
* does nothing, when accesses are out of bounds.
|
||||
*/
|
||||
for (i = 0; i < 4; i++)
|
||||
*(guint*) (&C[i]) = *(guint*) (bg_color);
|
||||
|
||||
read_pixel_data_1 (tm, x0, y0, C[0]);
|
||||
read_pixel_data_1 (tm, x1, y0, C[2]);
|
||||
read_pixel_data_1 (tm, x0, y1, C[1]);
|
||||
read_pixel_data_1 (tm, x1, y1, C[3]);
|
||||
const gint xscale = x & (FIXED_UNIT - 1);
|
||||
const gint yscale = y & (FIXED_UNIT - 1);
|
||||
const gint x0 = x >> FIXED_SHIFT;
|
||||
const gint y0 = y >> FIXED_SHIFT;
|
||||
gint rowstride;
|
||||
const guchar *src = pixel_surround_lock (surround, x0, y0, &rowstride);
|
||||
const guchar *s0 = src;
|
||||
const guchar *s1 = src + bpp;
|
||||
const guchar *s2 = src + rowstride;
|
||||
const guchar *s3 = src + rowstride + bpp;
|
||||
gint i;
|
||||
|
||||
#define lerp(v1, v2, r) \
|
||||
(((guint)(v1) * (FIXED_UNIT - (guint)(r)) + \
|
||||
(guint)(v2) * (guint)(r)) >> FIXED_SHIFT)
|
||||
|
||||
color[alpha]= lerp (lerp (C[0][alpha], C[1][alpha], yscale),
|
||||
lerp (C[2][alpha], C[3][alpha], yscale), xscale);
|
||||
color[alpha]= lerp (lerp (s0[alpha], s1[alpha], yscale),
|
||||
lerp (s2[alpha], s3[alpha], yscale), xscale);
|
||||
|
||||
if (color[alpha])
|
||||
{ /* to avoid problems, calculate with premultiplied alpha */
|
||||
{
|
||||
/* to avoid problems, calculate with premultiplied alpha */
|
||||
for (i = 0; i < alpha; i++)
|
||||
{
|
||||
C[0][i] = (C[0][i] * C[0][alpha] / 255);
|
||||
C[1][i] = (C[1][i] * C[1][alpha] / 255);
|
||||
C[2][i] = (C[2][i] * C[2][alpha] / 255);
|
||||
C[3][i] = (C[3][i] * C[3][alpha] / 255);
|
||||
color[i] = lerp (lerp (s0[i] * s0[alpha] / 255,
|
||||
s1[i] * s1[alpha] / 255, yscale),
|
||||
lerp (s2[i] * s2[alpha] / 255,
|
||||
s3[i] * s3[alpha] / 255, yscale), xscale);
|
||||
}
|
||||
|
||||
for (i = 0; i < alpha; i++)
|
||||
color[i] = lerp (lerp (C[0][i], C[1][i], yscale),
|
||||
lerp (C[2][i], C[3][i], yscale), xscale);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -902,10 +891,10 @@ sample_bi (TileManager *tm,
|
|||
* subdivision should be used.
|
||||
*/
|
||||
static inline gboolean
|
||||
supersample_test (gint x0, gint y0,
|
||||
gint x1, gint y1,
|
||||
gint x2, gint y2,
|
||||
gint x3, gint y3)
|
||||
supersample_test (const gint x0, const gint y0,
|
||||
const gint x1, const gint y1,
|
||||
const gint x2, const gint y2,
|
||||
const gint x3, const gint y3)
|
||||
{
|
||||
return (abs (x0 - x1) > FIXED_UNIT ||
|
||||
abs (x1 - x2) > FIXED_UNIT ||
|
||||
|
@ -925,10 +914,10 @@ supersample_test (gint x0, gint y0,
|
|||
* rotations.
|
||||
*/
|
||||
static inline gboolean
|
||||
supersample_dtest (gdouble x0, gdouble y0,
|
||||
gdouble x1, gdouble y1,
|
||||
gdouble x2, gdouble y2,
|
||||
gdouble x3, gdouble y3)
|
||||
supersample_dtest (const gdouble x0, const gdouble y0,
|
||||
const gdouble x1, const gdouble y1,
|
||||
const gdouble x2, const gdouble y2,
|
||||
const gdouble x3, const gdouble y3)
|
||||
{
|
||||
return (fabs (x0 - x1) > G_SQRT2 ||
|
||||
fabs (x1 - x2) > G_SQRT2 ||
|
||||
|
@ -947,30 +936,29 @@ supersample_dtest (gdouble x0, gdouble y0,
|
|||
0..3 is a cycle around the quad
|
||||
*/
|
||||
static void
|
||||
get_sample (TileManager *tm,
|
||||
gint xc,
|
||||
gint yc,
|
||||
gint x0,
|
||||
gint y0,
|
||||
gint x1,
|
||||
gint y1,
|
||||
gint x2,
|
||||
gint y2,
|
||||
gint x3,
|
||||
gint y3,
|
||||
gint *cc,
|
||||
gint level,
|
||||
guint *color,
|
||||
const guchar *bg_color,
|
||||
gint bpp,
|
||||
gint alpha)
|
||||
get_sample (PixelSurround *surround,
|
||||
const gint xc,
|
||||
const gint yc,
|
||||
const gint x0,
|
||||
const gint y0,
|
||||
const gint x1,
|
||||
const gint y1,
|
||||
const gint x2,
|
||||
const gint y2,
|
||||
const gint x3,
|
||||
const gint y3,
|
||||
gint *cc,
|
||||
const gint level,
|
||||
guint *color,
|
||||
const gint bpp,
|
||||
const gint alpha)
|
||||
{
|
||||
if (!level || !supersample_test (x0, y0, x1, y1, x2, y2, x3, y3))
|
||||
{
|
||||
gint i;
|
||||
guchar C[4];
|
||||
|
||||
sample_bi (tm, xc, yc, C, bg_color, bpp, alpha);
|
||||
sample_bi (surround, xc, yc, C, bpp, alpha);
|
||||
|
||||
for (i = 0; i < bpp; i++)
|
||||
color[i]+= C[i];
|
||||
|
@ -1004,45 +992,44 @@ get_sample (TileManager *tm,
|
|||
bry = (y2 + yc) / 2;
|
||||
by = (y3 + y2) / 2;
|
||||
|
||||
get_sample (tm,
|
||||
get_sample (surround,
|
||||
tlx,tly,
|
||||
x0,y0, tx,ty, xc,yc, lx,ly,
|
||||
cc, level-1, color, bg_color, bpp, alpha);
|
||||
cc, level-1, color, bpp, alpha);
|
||||
|
||||
get_sample (tm,
|
||||
get_sample (surround,
|
||||
trx,try,
|
||||
tx,ty, x1,y1, rx,ry, xc,yc,
|
||||
cc, level-1, color, bg_color, bpp, alpha);
|
||||
cc, level-1, color, bpp, alpha);
|
||||
|
||||
get_sample (tm,
|
||||
get_sample (surround,
|
||||
brx,bry,
|
||||
xc,yc, rx,ry, x2,y2, bx,by,
|
||||
cc, level-1, color, bg_color, bpp, alpha);
|
||||
cc, level-1, color, bpp, alpha);
|
||||
|
||||
get_sample (tm,
|
||||
get_sample (surround,
|
||||
blx,bly,
|
||||
lx,ly, xc,yc, bx,by, x3,y3,
|
||||
cc, level-1, color, bg_color, bpp, alpha);
|
||||
cc, level-1, color, bpp, alpha);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sample_adapt (TileManager *tm,
|
||||
gdouble xc,
|
||||
gdouble yc,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
gdouble x1,
|
||||
gdouble y1,
|
||||
gdouble x2,
|
||||
gdouble y2,
|
||||
gdouble x3,
|
||||
gdouble y3,
|
||||
gint level,
|
||||
guchar *color,
|
||||
const guchar *bg_color,
|
||||
gint bpp,
|
||||
gint alpha)
|
||||
sample_adapt (PixelSurround *surround,
|
||||
const gdouble xc,
|
||||
const gdouble yc,
|
||||
const gdouble x0,
|
||||
const gdouble y0,
|
||||
const gdouble x1,
|
||||
const gdouble y1,
|
||||
const gdouble x2,
|
||||
const gdouble y2,
|
||||
const gdouble x3,
|
||||
const gdouble y3,
|
||||
const gint level,
|
||||
guchar *color,
|
||||
const gint bpp,
|
||||
const gint alpha)
|
||||
{
|
||||
gint cc = 0;
|
||||
gint i;
|
||||
|
@ -1050,13 +1037,13 @@ sample_adapt (TileManager *tm,
|
|||
|
||||
C[0] = C[1] = C[2] = C[3] = 0;
|
||||
|
||||
get_sample (tm,
|
||||
get_sample (surround,
|
||||
DOUBLE2FIXED (xc), DOUBLE2FIXED (yc),
|
||||
DOUBLE2FIXED (x0), DOUBLE2FIXED (y0),
|
||||
DOUBLE2FIXED (x1), DOUBLE2FIXED (y1),
|
||||
DOUBLE2FIXED (x2), DOUBLE2FIXED (y2),
|
||||
DOUBLE2FIXED (x3), DOUBLE2FIXED (y3),
|
||||
&cc, level, C, bg_color, bpp, alpha);
|
||||
&cc, level, C, bpp, alpha);
|
||||
|
||||
if (!cc)
|
||||
cc=1;
|
||||
|
@ -1092,11 +1079,11 @@ sample_adapt (TileManager *tm,
|
|||
/* Note: cubic function no longer clips result. */
|
||||
/* Inlining this function makes sample_cubic() run about 10% faster. (Sven) */
|
||||
static inline gdouble
|
||||
gimp_drawable_transform_cubic (gdouble dx,
|
||||
gint jm1,
|
||||
gint j,
|
||||
gint jp1,
|
||||
gint jp2)
|
||||
gimp_drawable_transform_cubic (const gdouble dx,
|
||||
const gint jm1,
|
||||
const gint j,
|
||||
const gint jp1,
|
||||
const gint jp2)
|
||||
{
|
||||
gdouble result;
|
||||
|
||||
|
@ -1127,18 +1114,18 @@ gimp_drawable_transform_cubic (gdouble dx,
|
|||
*/
|
||||
static void
|
||||
sample_cubic (PixelSurround *surround,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha)
|
||||
const gint bytes,
|
||||
const gint alpha)
|
||||
{
|
||||
gdouble a_val, a_recip;
|
||||
gint i;
|
||||
gint iu = floor(u);
|
||||
gint iv = floor(v);
|
||||
gint rowstride;
|
||||
const gint iu = floor(u);
|
||||
const gint iv = floor(v);
|
||||
gdouble du, dv;
|
||||
gint rowstride;
|
||||
const guchar *data;
|
||||
|
||||
/* lock the pixel surround */
|
||||
|
@ -1207,11 +1194,11 @@ sample_cubic (PixelSurround *surround,
|
|||
static void
|
||||
sample_lanczos (PixelSurround *surround,
|
||||
const gfloat *lanczos,
|
||||
gdouble u,
|
||||
gdouble v,
|
||||
const gdouble u,
|
||||
const gdouble v,
|
||||
guchar *color,
|
||||
gint bytes,
|
||||
gint alpha)
|
||||
const gint bytes,
|
||||
const gint alpha)
|
||||
{
|
||||
gdouble x_kernel[LANCZOS_WIDTH2]; /* 1-D kernels of window coeffs */
|
||||
gdouble y_kernel[LANCZOS_WIDTH2];
|
||||
|
|
|
@ -212,7 +212,7 @@ gimp_user_install_detect_old (GimpUserInstall *install)
|
|||
{
|
||||
gint i;
|
||||
|
||||
for (i = 4; i >= 0; i -= 2)
|
||||
for (i = (GIMP_MINOR_VERSION & ~1); i >= 0; i -= 2)
|
||||
{
|
||||
/* we assume that GIMP_APP_VERSION is in the form '2.x' */
|
||||
g_snprintf (version + 2, 2, "%d", i);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <string.h> /* strlen */
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpconfig/gimpconfig.h"
|
||||
|
@ -187,6 +187,8 @@ gimp_init (Gimp *gimp)
|
|||
gimp->stack_trace_mode = GIMP_STACK_TRACE_NEVER;
|
||||
gimp->pdb_compat_mode = GIMP_PDB_COMPAT_OFF;
|
||||
|
||||
gimp->restored = FALSE;
|
||||
|
||||
gimp_gui_init (gimp);
|
||||
|
||||
gimp->busy = 0;
|
||||
|
@ -637,6 +639,8 @@ gimp_real_restore (Gimp *gimp,
|
|||
|
||||
gimp_plug_in_manager_restore (gimp->plug_in_manager,
|
||||
gimp_get_user_context (gimp), status_callback);
|
||||
|
||||
gimp->restored = TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -882,6 +886,21 @@ gimp_restore (Gimp *gimp,
|
|||
g_signal_emit (gimp, gimp_signals[RESTORE], 0, status_callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_is_restored:
|
||||
* @gimp: a #Gimp object
|
||||
*
|
||||
* Return value: %TRUE if GIMP is completely started, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
gimp_is_restored (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
||||
|
||||
return gimp->restored;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gimp_exit:
|
||||
* @gimp: a #Gimp object
|
||||
|
|
|
@ -53,7 +53,9 @@ struct _Gimp
|
|||
GimpStackTraceMode stack_trace_mode;
|
||||
GimpPDBCompatMode pdb_compat_mode;
|
||||
|
||||
GimpGui gui; /* gui vtable */
|
||||
GimpGui gui; /* gui vtable */
|
||||
|
||||
gboolean restored; /* becomes TRUE in gimp_restore() */
|
||||
|
||||
gint busy;
|
||||
guint busy_idle_id;
|
||||
|
@ -152,6 +154,7 @@ void gimp_initialize (Gimp *gimp,
|
|||
GimpInitStatusFunc status_callback);
|
||||
void gimp_restore (Gimp *gimp,
|
||||
GimpInitStatusFunc status_callback);
|
||||
gboolean gimp_is_restored (Gimp *gimp);
|
||||
|
||||
void gimp_exit (Gimp *gimp,
|
||||
gboolean force);
|
||||
|
|
|
@ -51,36 +51,36 @@ enum
|
|||
|
||||
static void gimp_brush_tagged_init (GimpTaggedInterface *iface);
|
||||
|
||||
static void gimp_brush_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_finalize (GObject *object);
|
||||
static void gimp_brush_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_brush_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static gint64 gimp_brush_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gboolean gimp_brush_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_brush_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_brush_get_extension (GimpData *data);
|
||||
static gboolean gimp_brush_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_brush_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static const gchar * gimp_brush_get_extension (GimpData *data);
|
||||
|
||||
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
|
||||
static gchar * gimp_brush_get_checksum (GimpTagged *tagged);
|
||||
|
||||
|
@ -348,7 +348,7 @@ gimp_brush_get_description (GimpViewable *viewable,
|
|||
brush->mask->height);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
static const gchar *
|
||||
gimp_brush_get_extension (GimpData *data)
|
||||
{
|
||||
return GIMP_BRUSH_FILE_EXTENSION;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
|
|
|
@ -51,47 +51,48 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_brush_generated_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_generated_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_generated_dirty (GimpData *data);
|
||||
static gchar * gimp_brush_generated_get_extension (GimpData *data);
|
||||
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
|
||||
static void gimp_brush_generated_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_brush_generated_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_brush_generated_scale_size (GimpBrush *gbrush,
|
||||
gdouble scale,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_generated_scale_mask (GimpBrush *gbrush,
|
||||
gdouble scale);
|
||||
static void gimp_brush_generated_dirty (GimpData *data);
|
||||
static const gchar * gimp_brush_generated_get_extension (GimpData *data);
|
||||
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
|
||||
|
||||
static TempBuf * gimp_brush_generated_calc (GimpBrushGenerated *brush,
|
||||
GimpBrushGeneratedShape shape,
|
||||
gfloat radius,
|
||||
gint spikes,
|
||||
gfloat hardness,
|
||||
gfloat aspect_ratio,
|
||||
gfloat angle,
|
||||
GimpVector2 *xaxis,
|
||||
GimpVector2 *yaxis);
|
||||
static void gimp_brush_generated_get_half_size (GimpBrushGenerated *gbrush,
|
||||
GimpBrushGeneratedShape shape,
|
||||
gfloat radius,
|
||||
gint spikes,
|
||||
gfloat hardness,
|
||||
gfloat aspect_ratio,
|
||||
gdouble angle_in_degrees,
|
||||
gint *half_width,
|
||||
gint *half_height,
|
||||
gdouble *_s,
|
||||
gdouble *_c,
|
||||
GimpVector2 *_x_axis,
|
||||
GimpVector2 *_y_axis);
|
||||
static void gimp_brush_generated_scale_size (GimpBrush *gbrush,
|
||||
gdouble scale,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_generated_scale_mask (GimpBrush *gbrush,
|
||||
gdouble scale);
|
||||
|
||||
static TempBuf * gimp_brush_generated_calc (GimpBrushGenerated *brush,
|
||||
GimpBrushGeneratedShape shape,
|
||||
gfloat radius,
|
||||
gint spikes,
|
||||
gfloat hardness,
|
||||
gfloat aspect_ratio,
|
||||
gfloat angle,
|
||||
GimpVector2 *xaxis,
|
||||
GimpVector2 *yaxis);
|
||||
static void gimp_brush_generated_get_half_size (GimpBrushGenerated *gbrush,
|
||||
GimpBrushGeneratedShape shape,
|
||||
gfloat radius,
|
||||
gint spikes,
|
||||
gfloat hardness,
|
||||
gfloat aspect_ratio,
|
||||
gdouble angle_in_degrees,
|
||||
gint *half_width,
|
||||
gint *half_height,
|
||||
gdouble *_s,
|
||||
gdouble *_c,
|
||||
GimpVector2 *_x_axis,
|
||||
GimpVector2 *_y_axis);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpBrushGenerated, gimp_brush_generated, GIMP_TYPE_BRUSH)
|
||||
|
@ -256,7 +257,7 @@ gimp_brush_generated_dirty (GimpData *data)
|
|||
GIMP_DATA_CLASS (parent_class)->dirty (data);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
static const gchar *
|
||||
gimp_brush_generated_get_extension (GimpData *data)
|
||||
{
|
||||
return GIMP_BRUSH_GENERATED_FILE_EXTENSION;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
|
@ -65,6 +65,13 @@ enum
|
|||
};
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: gegl_node_add_child() needs to be public
|
||||
#endif
|
||||
GeglNode * gegl_node_add_child (GeglNode *self,
|
||||
GeglNode *child);
|
||||
|
||||
|
||||
static void gimp_channel_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_channel_finalize (GObject *object);
|
||||
|
@ -75,6 +82,7 @@ static gint64 gimp_channel_get_memsize (GimpObject *object,
|
|||
static gchar * gimp_channel_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
|
||||
static void gimp_channel_visibility_changed (GimpItem *item);
|
||||
static gboolean gimp_channel_is_attached (GimpItem *item);
|
||||
static GimpItem * gimp_channel_duplicate (GimpItem *item,
|
||||
GType new_type);
|
||||
|
@ -150,6 +158,7 @@ static void gimp_channel_set_tiles (GimpDrawable *drawable,
|
|||
GimpImageType type,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
static GeglNode * gimp_channel_get_node (GimpDrawable *drawable);
|
||||
static void gimp_channel_swap_pixels (GimpDrawable *drawable,
|
||||
TileManager *tiles,
|
||||
gboolean sparse,
|
||||
|
@ -244,31 +253,33 @@ gimp_channel_class_init (GimpChannelClass *klass)
|
|||
viewable_class->get_description = gimp_channel_get_description;
|
||||
viewable_class->default_stock_id = "gimp-channel";
|
||||
|
||||
item_class->is_attached = gimp_channel_is_attached;
|
||||
item_class->duplicate = gimp_channel_duplicate;
|
||||
item_class->convert = gimp_channel_convert;
|
||||
item_class->translate = gimp_channel_translate;
|
||||
item_class->scale = gimp_channel_scale;
|
||||
item_class->resize = gimp_channel_resize;
|
||||
item_class->flip = gimp_channel_flip;
|
||||
item_class->rotate = gimp_channel_rotate;
|
||||
item_class->transform = gimp_channel_transform;
|
||||
item_class->stroke = gimp_channel_stroke;
|
||||
item_class->default_name = _("Channel");
|
||||
item_class->rename_desc = _("Rename Channel");
|
||||
item_class->translate_desc = _("Move Channel");
|
||||
item_class->scale_desc = _("Scale Channel");
|
||||
item_class->resize_desc = _("Resize Channel");
|
||||
item_class->flip_desc = _("Flip Channel");
|
||||
item_class->rotate_desc = _("Rotate Channel");
|
||||
item_class->transform_desc = _("Transform Channel");
|
||||
item_class->stroke_desc = _("Stroke Channel");
|
||||
item_class->visibility_changed = gimp_channel_visibility_changed;
|
||||
item_class->is_attached = gimp_channel_is_attached;
|
||||
item_class->duplicate = gimp_channel_duplicate;
|
||||
item_class->convert = gimp_channel_convert;
|
||||
item_class->translate = gimp_channel_translate;
|
||||
item_class->scale = gimp_channel_scale;
|
||||
item_class->resize = gimp_channel_resize;
|
||||
item_class->flip = gimp_channel_flip;
|
||||
item_class->rotate = gimp_channel_rotate;
|
||||
item_class->transform = gimp_channel_transform;
|
||||
item_class->stroke = gimp_channel_stroke;
|
||||
item_class->default_name = _("Channel");
|
||||
item_class->rename_desc = _("Rename Channel");
|
||||
item_class->translate_desc = _("Move Channel");
|
||||
item_class->scale_desc = _("Scale Channel");
|
||||
item_class->resize_desc = _("Resize Channel");
|
||||
item_class->flip_desc = _("Flip Channel");
|
||||
item_class->rotate_desc = _("Rotate Channel");
|
||||
item_class->transform_desc = _("Transform Channel");
|
||||
item_class->stroke_desc = _("Stroke Channel");
|
||||
|
||||
drawable_class->invalidate_boundary = gimp_channel_invalidate_boundary;
|
||||
drawable_class->get_active_components = gimp_channel_get_active_components;
|
||||
drawable_class->apply_region = gimp_channel_apply_region;
|
||||
drawable_class->replace_region = gimp_channel_replace_region;
|
||||
drawable_class->set_tiles = gimp_channel_set_tiles;
|
||||
drawable_class->get_node = gimp_channel_get_node;
|
||||
drawable_class->swap_pixels = gimp_channel_swap_pixels;
|
||||
|
||||
klass->boundary = gimp_channel_real_boundary;
|
||||
|
@ -325,6 +336,12 @@ gimp_channel_finalize (GObject *object)
|
|||
{
|
||||
GimpChannel *channel = GIMP_CHANNEL (object);
|
||||
|
||||
if (channel->node)
|
||||
{
|
||||
g_object_unref (channel->node);
|
||||
channel->node = NULL;
|
||||
}
|
||||
|
||||
if (channel->segs_in)
|
||||
{
|
||||
g_free (channel->segs_in);
|
||||
|
@ -366,6 +383,39 @@ gimp_channel_get_description (GimpViewable *viewable,
|
|||
tooltip);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_visibility_changed (GimpItem *item)
|
||||
{
|
||||
GimpChannel *channel = GIMP_CHANNEL (item);
|
||||
|
||||
if (channel->node)
|
||||
{
|
||||
GeglNode *input;
|
||||
GeglNode *output;
|
||||
|
||||
input = gegl_node_get_input_proxy (channel->node, "input");
|
||||
output = gegl_node_get_output_proxy (channel->node, "output");
|
||||
|
||||
if (gimp_item_get_visible (item))
|
||||
{
|
||||
gegl_node_connect_to (input, "output",
|
||||
channel->mode_node, "input");
|
||||
gegl_node_connect_to (channel->mode_node, "output",
|
||||
output, "input");
|
||||
}
|
||||
else
|
||||
{
|
||||
gegl_node_disconnect (channel->mode_node, "input");
|
||||
|
||||
gegl_node_connect_to (input, "output",
|
||||
output, "input");
|
||||
}
|
||||
}
|
||||
|
||||
if (GIMP_ITEM_CLASS (parent_class)->visibility_changed)
|
||||
GIMP_ITEM_CLASS (parent_class)->visibility_changed (item);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_channel_is_attached (GimpItem *item)
|
||||
{
|
||||
|
@ -494,7 +544,6 @@ gimp_channel_translate (GimpItem *item,
|
|||
GimpChannel *tmp_mask = NULL;
|
||||
gint width, height;
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar empty = TRANSPARENT_OPACITY;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
gimp_channel_bounds (channel, &x1, &y1, &x2, &y2);
|
||||
|
@ -539,7 +588,7 @@ gimp_channel_translate (GimpItem *item,
|
|||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (channel)),
|
||||
gimp_item_height (GIMP_ITEM (channel)), TRUE);
|
||||
color_region (&srcPR, &empty);
|
||||
clear_region (&srcPR);
|
||||
|
||||
if (width != 0 && height != 0)
|
||||
{
|
||||
|
@ -823,6 +872,89 @@ gimp_channel_set_tiles (GimpDrawable *drawable,
|
|||
GIMP_CHANNEL (drawable)->bounds_known = FALSE;
|
||||
}
|
||||
|
||||
static GeglNode *
|
||||
gimp_channel_get_node (GimpDrawable *drawable)
|
||||
{
|
||||
GimpChannel *channel = GIMP_CHANNEL (drawable);
|
||||
GeglNode *source;
|
||||
GeglNode *input;
|
||||
GeglNode *output;
|
||||
GeglColor *color;
|
||||
|
||||
g_printerr ("%s 1\n", G_STRFUNC);
|
||||
|
||||
if (channel->node)
|
||||
return channel->node;
|
||||
|
||||
g_printerr ("%s 2\n", G_STRFUNC);
|
||||
|
||||
channel->node = gegl_node_new ();
|
||||
|
||||
source = gimp_drawable_get_source_node (drawable);
|
||||
gegl_node_add_child (channel->node, source);
|
||||
|
||||
color = gegl_color_new (NULL);
|
||||
gegl_color_set_rgba (color,
|
||||
channel->color.r,
|
||||
channel->color.g,
|
||||
channel->color.b,
|
||||
channel->color.a);
|
||||
|
||||
channel->color_node = gegl_node_new_child (channel->node,
|
||||
"operation", "color",
|
||||
"value", color,
|
||||
NULL);
|
||||
|
||||
g_object_unref (color);
|
||||
|
||||
channel->mask_node = gegl_node_new_child (channel->node,
|
||||
"operation", "opacity",
|
||||
NULL);
|
||||
gegl_node_connect_to (channel->color_node, "output",
|
||||
channel->mask_node, "input");
|
||||
|
||||
channel->invert_node = gegl_node_new_child (channel->node,
|
||||
"operation", "invert",
|
||||
NULL);
|
||||
|
||||
if (channel->show_masked)
|
||||
{
|
||||
gegl_node_connect_to (source, "output",
|
||||
channel->invert_node, "input");
|
||||
gegl_node_connect_to (channel->invert_node, "output",
|
||||
channel->mask_node, "aux");
|
||||
}
|
||||
else
|
||||
{
|
||||
gegl_node_connect_to (source, "output",
|
||||
channel->mask_node, "aux");
|
||||
}
|
||||
|
||||
channel->mode_node = gegl_node_new_child (channel->node,
|
||||
"operation", "normal",
|
||||
NULL);
|
||||
gegl_node_connect_to (channel->mask_node, "output",
|
||||
channel->mode_node, "aux");
|
||||
|
||||
input = gegl_node_get_input_proxy (channel->node, "input");
|
||||
output = gegl_node_get_output_proxy (channel->node, "output");
|
||||
|
||||
if (gimp_item_get_visible (GIMP_ITEM (channel)))
|
||||
{
|
||||
gegl_node_connect_to (input, "output",
|
||||
channel->mode_node, "input");
|
||||
gegl_node_connect_to (channel->mode_node, "output",
|
||||
output, "input");
|
||||
}
|
||||
else
|
||||
{
|
||||
gegl_node_connect_to (input, "output",
|
||||
output, "input");
|
||||
}
|
||||
|
||||
return channel->node;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_swap_pixels (GimpDrawable *drawable,
|
||||
TileManager *tiles,
|
||||
|
@ -1195,7 +1327,6 @@ gimp_channel_real_clear (GimpChannel *channel,
|
|||
gboolean push_undo)
|
||||
{
|
||||
PixelRegion maskPR;
|
||||
guchar bg = TRANSPARENT_OPACITY;
|
||||
|
||||
if (push_undo)
|
||||
{
|
||||
|
@ -1216,7 +1347,7 @@ gimp_channel_real_clear (GimpChannel *channel,
|
|||
channel->x1, channel->y1,
|
||||
channel->x2 - channel->x1,
|
||||
channel->y2 - channel->y1, TRUE);
|
||||
color_region (&maskPR, &bg);
|
||||
clear_region (&maskPR);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1226,7 +1357,7 @@ gimp_channel_real_clear (GimpChannel *channel,
|
|||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (channel)),
|
||||
gimp_item_height (GIMP_ITEM (channel)), TRUE);
|
||||
color_region (&maskPR, &bg);
|
||||
clear_region (&maskPR);
|
||||
}
|
||||
|
||||
/* we know the bounds */
|
||||
|
@ -1636,6 +1767,24 @@ gimp_channel_set_color (GimpChannel *channel,
|
|||
|
||||
channel->color = *color;
|
||||
|
||||
if (channel->color_node)
|
||||
{
|
||||
GeglColor *gegl_color;
|
||||
|
||||
gegl_color = gegl_color_new (NULL);
|
||||
gegl_color_set_rgba (gegl_color,
|
||||
channel->color.r,
|
||||
channel->color.g,
|
||||
channel->color.b,
|
||||
channel->color.a);
|
||||
|
||||
gegl_node_set (channel->color_node,
|
||||
"value", gegl_color,
|
||||
NULL);
|
||||
|
||||
g_object_unref (gegl_color);
|
||||
}
|
||||
|
||||
gimp_drawable_update (GIMP_DRAWABLE (channel),
|
||||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (channel)),
|
||||
|
@ -1684,6 +1833,24 @@ gimp_channel_set_opacity (GimpChannel *channel,
|
|||
|
||||
channel->color.a = opacity;
|
||||
|
||||
if (channel->color_node)
|
||||
{
|
||||
GeglColor *gegl_color;
|
||||
|
||||
gegl_color = gegl_color_new (NULL);
|
||||
gegl_color_set_rgba (gegl_color,
|
||||
channel->color.r,
|
||||
channel->color.g,
|
||||
channel->color.b,
|
||||
channel->color.a);
|
||||
|
||||
gegl_node_set (channel->color_node,
|
||||
"value", gegl_color,
|
||||
NULL);
|
||||
|
||||
g_object_unref (gegl_color);
|
||||
}
|
||||
|
||||
gimp_drawable_update (GIMP_DRAWABLE (channel),
|
||||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (channel)),
|
||||
|
@ -1711,6 +1878,28 @@ gimp_channel_set_show_masked (GimpChannel *channel,
|
|||
{
|
||||
channel->show_masked = show_masked ? TRUE : FALSE;
|
||||
|
||||
if (channel->invert_node)
|
||||
{
|
||||
GeglNode *source;
|
||||
|
||||
source = gimp_drawable_get_source_node (GIMP_DRAWABLE (channel));
|
||||
|
||||
if (channel->show_masked)
|
||||
{
|
||||
gegl_node_connect_to (source, "output",
|
||||
channel->invert_node, "input");
|
||||
gegl_node_connect_to (channel->invert_node, "output",
|
||||
channel->mask_node, "aux");
|
||||
}
|
||||
else
|
||||
{
|
||||
gegl_node_disconnect (channel->invert_node, "input");
|
||||
|
||||
gegl_node_connect_to (source, "output",
|
||||
channel->mask_node, "aux");
|
||||
}
|
||||
}
|
||||
|
||||
gimp_drawable_update (GIMP_DRAWABLE (channel),
|
||||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (channel)),
|
||||
|
|
|
@ -40,6 +40,12 @@ struct _GimpChannel
|
|||
gboolean show_masked; /* Show masked areas--as */
|
||||
/* opposed to selected areas */
|
||||
|
||||
GeglNode *node;
|
||||
GeglNode *color_node;
|
||||
GeglNode *invert_node;
|
||||
GeglNode *mask_node;
|
||||
GeglNode *mode_node;
|
||||
|
||||
/* Selection mask variables */
|
||||
gboolean boundary_known; /* is the current boundary valid */
|
||||
BoundSeg *segs_in; /* outline of selected region */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpchannelundo.h"
|
||||
|
@ -193,17 +192,8 @@ gimp_channel_undo_pop (GimpUndo *undo,
|
|||
channel_undo->prev_position = gimp_image_get_channel_index (undo->image,
|
||||
channel);
|
||||
|
||||
gimp_container_remove (undo->image->channels, GIMP_OBJECT (channel));
|
||||
gimp_item_removed (GIMP_ITEM (channel));
|
||||
|
||||
if (channel == gimp_image_get_active_channel (undo->image))
|
||||
{
|
||||
if (channel_undo->prev_channel)
|
||||
gimp_image_set_active_channel (undo->image,
|
||||
channel_undo->prev_channel);
|
||||
else
|
||||
gimp_image_unset_active_channel (undo->image);
|
||||
}
|
||||
gimp_image_remove_channel (undo->image, channel, FALSE,
|
||||
channel_undo->prev_channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -212,9 +202,8 @@ gimp_channel_undo_pop (GimpUndo *undo,
|
|||
/* record the active channel */
|
||||
channel_undo->prev_channel = gimp_image_get_active_channel (undo->image);
|
||||
|
||||
gimp_container_insert (undo->image->channels, GIMP_OBJECT (channel),
|
||||
channel_undo->prev_position);
|
||||
gimp_image_set_active_channel (undo->image, channel);
|
||||
gimp_image_add_channel (undo->image, channel,
|
||||
channel_undo->prev_position, FALSE);
|
||||
|
||||
GIMP_ITEM (channel)->removed = FALSE;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,11 @@ static void gimp_container_get_property (GObject *object,
|
|||
static gint64 gimp_container_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static void gimp_container_real_add (GimpContainer *container,
|
||||
GimpObject *object);
|
||||
static void gimp_container_real_remove (GimpContainer *container,
|
||||
GimpObject *object);
|
||||
|
||||
static gboolean gimp_container_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
|
@ -170,8 +175,8 @@ gimp_container_class_init (GimpContainerClass *klass)
|
|||
|
||||
gimp_object_class->get_memsize = gimp_container_get_memsize;
|
||||
|
||||
klass->add = NULL;
|
||||
klass->remove = NULL;
|
||||
klass->add = gimp_container_real_add;
|
||||
klass->remove = gimp_container_real_remove;
|
||||
klass->reorder = NULL;
|
||||
klass->freeze = NULL;
|
||||
klass->thaw = NULL;
|
||||
|
@ -304,6 +309,21 @@ gimp_container_get_memsize (GimpObject *object,
|
|||
gui_size);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_real_add (GimpContainer *container,
|
||||
GimpObject *object)
|
||||
{
|
||||
container->num_children++;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_real_remove (GimpContainer *container,
|
||||
GimpObject *object)
|
||||
{
|
||||
container->num_children--;
|
||||
}
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GimpConfigWriter *writer;
|
||||
|
@ -515,9 +535,8 @@ gboolean
|
|||
gimp_container_add (GimpContainer *container,
|
||||
GimpObject *object)
|
||||
{
|
||||
GimpContainerHandler *handler;
|
||||
GList *list;
|
||||
gulong handler_id;
|
||||
GList *list;
|
||||
gint n_children;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), FALSE);
|
||||
g_return_val_if_fail (object != NULL, FALSE);
|
||||
|
@ -534,7 +553,8 @@ gimp_container_add (GimpContainer *container,
|
|||
|
||||
for (list = container->handlers; list; list = g_list_next (list))
|
||||
{
|
||||
handler = (GimpContainerHandler *) list->data;
|
||||
GimpContainerHandler *handler = list->data;
|
||||
gulong handler_id;
|
||||
|
||||
handler_id = g_signal_connect (object,
|
||||
handler->signame,
|
||||
|
@ -558,10 +578,19 @@ gimp_container_add (GimpContainer *container,
|
|||
break;
|
||||
}
|
||||
|
||||
container->num_children++;
|
||||
n_children = container->num_children;
|
||||
|
||||
g_signal_emit (container, container_signals[ADD], 0, object);
|
||||
|
||||
if (n_children == container->num_children)
|
||||
{
|
||||
g_warning ("%s: GimpContainer::add() implementation did not "
|
||||
"chain up. Please report this at http://www.gimp.org/bugs/",
|
||||
G_STRFUNC);
|
||||
|
||||
container->num_children++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -569,9 +598,8 @@ gboolean
|
|||
gimp_container_remove (GimpContainer *container,
|
||||
GimpObject *object)
|
||||
{
|
||||
GimpContainerHandler *handler;
|
||||
GList *list;
|
||||
gulong handler_id;
|
||||
GList *list;
|
||||
gint n_children;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), FALSE);
|
||||
g_return_val_if_fail (object != NULL, FALSE);
|
||||
|
@ -588,7 +616,8 @@ gimp_container_remove (GimpContainer *container,
|
|||
|
||||
for (list = container->handlers; list; list = g_list_next (list))
|
||||
{
|
||||
handler = (GimpContainerHandler *) list->data;
|
||||
GimpContainerHandler *handler = list->data;
|
||||
gulong handler_id;
|
||||
|
||||
handler_id = GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (object),
|
||||
handler->quark));
|
||||
|
@ -601,10 +630,18 @@ gimp_container_remove (GimpContainer *container,
|
|||
}
|
||||
}
|
||||
|
||||
container->num_children--;
|
||||
n_children = container->num_children;
|
||||
|
||||
g_signal_emit (container, container_signals[REMOVE], 0,
|
||||
object);
|
||||
g_signal_emit (container, container_signals[REMOVE], 0, object);
|
||||
|
||||
if (n_children == container->num_children)
|
||||
{
|
||||
g_warning ("%s: GimpContainer::remove() implementation did not "
|
||||
"chain up. Please report this at http://www.gimp.org/bugs/",
|
||||
G_STRFUNC);
|
||||
|
||||
container->num_children--;
|
||||
}
|
||||
|
||||
switch (container->policy)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
@ -1766,9 +1766,13 @@ static void
|
|||
gimp_context_real_set_display (GimpContext *context,
|
||||
gpointer display)
|
||||
{
|
||||
GimpObject *old_display;
|
||||
|
||||
if (context->display == display)
|
||||
return;
|
||||
|
||||
old_display = context->display;
|
||||
|
||||
context->display = display;
|
||||
|
||||
if (context->display)
|
||||
|
@ -1782,6 +1786,10 @@ gimp_context_real_set_display (GimpContext *context,
|
|||
if (image)
|
||||
g_object_unref (image);
|
||||
}
|
||||
else if (old_display)
|
||||
{
|
||||
gimp_context_real_set_image (context, NULL);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (context), "display");
|
||||
gimp_context_display_changed (context);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <string.h> /* memcmp */
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
|
@ -48,69 +48,69 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_curve_config_iface_init (GimpConfigInterface *iface);
|
||||
static void gimp_curve_config_iface_init (GimpConfigInterface *iface);
|
||||
|
||||
static void gimp_curve_finalize (GObject *object);
|
||||
static void gimp_curve_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_curve_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_curve_finalize (GObject *object);
|
||||
static void gimp_curve_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_curve_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static gint64 gimp_curve_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static gint64 gimp_curve_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static void gimp_curve_get_preview_size (GimpViewable *viewable,
|
||||
gint size,
|
||||
gboolean popup,
|
||||
gboolean dot_for_dot,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static gboolean gimp_curve_get_popup_size (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static TempBuf * gimp_curve_get_new_preview (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_curve_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static void gimp_curve_get_preview_size (GimpViewable *viewable,
|
||||
gint size,
|
||||
gboolean popup,
|
||||
gboolean dot_for_dot,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static gboolean gimp_curve_get_popup_size (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static TempBuf * gimp_curve_get_new_preview (GimpViewable *viewable,
|
||||
GimpContext *context,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_curve_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
|
||||
static void gimp_curve_dirty (GimpData *data);
|
||||
static gchar * gimp_curve_get_extension (GimpData *data);
|
||||
static GimpData * gimp_curve_duplicate (GimpData *data);
|
||||
static void gimp_curve_dirty (GimpData *data);
|
||||
static const gchar * gimp_curve_get_extension (GimpData *data);
|
||||
static GimpData * gimp_curve_duplicate (GimpData *data);
|
||||
|
||||
static gboolean gimp_curve_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
static gboolean gimp_curve_deserialize (GimpConfig *config,
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
static gboolean gimp_curve_equal (GimpConfig *a,
|
||||
GimpConfig *b);
|
||||
static void _gimp_curve_reset (GimpConfig *config);
|
||||
static gboolean gimp_curve_copy (GimpConfig *src,
|
||||
GimpConfig *dest,
|
||||
GParamFlags flags);
|
||||
static gboolean gimp_curve_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
static gboolean gimp_curve_deserialize (GimpConfig *config,
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
static gboolean gimp_curve_equal (GimpConfig *a,
|
||||
GimpConfig *b);
|
||||
static void _gimp_curve_reset (GimpConfig *config);
|
||||
static gboolean gimp_curve_copy (GimpConfig *src,
|
||||
GimpConfig *dest,
|
||||
GParamFlags flags);
|
||||
|
||||
static void gimp_curve_set_n_points (GimpCurve *curve,
|
||||
gint n_points);
|
||||
static void gimp_curve_set_n_samples (GimpCurve *curve,
|
||||
gint n_samples);
|
||||
static void gimp_curve_set_n_points (GimpCurve *curve,
|
||||
gint n_points);
|
||||
static void gimp_curve_set_n_samples (GimpCurve *curve,
|
||||
gint n_samples);
|
||||
|
||||
static void gimp_curve_calculate (GimpCurve *curve);
|
||||
static void gimp_curve_plot (GimpCurve *curve,
|
||||
gint p1,
|
||||
gint p2,
|
||||
gint p3,
|
||||
gint p4);
|
||||
static void gimp_curve_calculate (GimpCurve *curve);
|
||||
static void gimp_curve_plot (GimpCurve *curve,
|
||||
gint p1,
|
||||
gint p2,
|
||||
gint p3,
|
||||
gint p4);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpCurve, gimp_curve, GIMP_TYPE_DATA,
|
||||
|
@ -358,7 +358,7 @@ gimp_curve_get_property (GObject *object,
|
|||
|
||||
static gint64
|
||||
gimp_curve_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size)
|
||||
gint64 *gui_size)
|
||||
{
|
||||
GimpCurve *curve = GIMP_CURVE (object);
|
||||
gint64 memsize = 0;
|
||||
|
@ -426,7 +426,7 @@ gimp_curve_dirty (GimpData *data)
|
|||
GIMP_DATA_CLASS (parent_class)->dirty (data);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
static const gchar *
|
||||
gimp_curve_get_extension (GimpData *data)
|
||||
{
|
||||
return GIMP_CURVE_FILE_EXTENSION;
|
||||
|
@ -503,14 +503,11 @@ gimp_curve_copy (GimpConfig *src,
|
|||
|
||||
gimp_config_sync (G_OBJECT (src), G_OBJECT (dest), flags);
|
||||
|
||||
memcpy (dest_curve->points, src_curve->points,
|
||||
sizeof (GimpVector2) * src_curve->n_points);
|
||||
memcpy (dest_curve->samples, src_curve->samples,
|
||||
sizeof (gdouble) * src_curve->n_samples);
|
||||
|
||||
dest_curve->identity = src_curve->identity;
|
||||
|
||||
return FALSE;
|
||||
gimp_data_dirty (GIMP_DATA (dest));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -813,7 +810,12 @@ gimp_curve_get_point (GimpCurve *curve,
|
|||
g_return_if_fail (point >= 0 && point < curve->n_points);
|
||||
|
||||
if (curve->curve_type == GIMP_CURVE_FREE)
|
||||
return;
|
||||
{
|
||||
if (x) *x = -1.0;
|
||||
if (y) *y = -1.0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (x) *x = curve->points[point].x;
|
||||
if (y) *y = curve->points[point].y;
|
||||
|
@ -978,7 +980,7 @@ gimp_curve_plot (GimpCurve *curve,
|
|||
|
||||
/*
|
||||
* the x values of the inner control points are fixed at
|
||||
* x1 = 1/3*x0 + 2/3*x3 and x2 = 2/3*x0 + 1/3*x3
|
||||
* x1 = 2/3*x0 + 1/3*x3 and x2 = 1/3*x0 + 2/3*x3
|
||||
* this ensures that the x values increase linearily with the
|
||||
* parameter t and enables us to skip the calculation of the x
|
||||
* values altogehter - just calculate y(t) evenly spaced.
|
||||
|
@ -1005,8 +1007,7 @@ gimp_curve_plot (GimpCurve *curve,
|
|||
* the control handle of the right tangent, to ensure that the curve
|
||||
* does not have an inflection point.
|
||||
*/
|
||||
slope = (curve->points[p4].y - y0) /
|
||||
(curve->points[p4].x - x0);
|
||||
slope = (curve->points[p4].y - y0) / (curve->points[p4].x - x0);
|
||||
|
||||
y2 = y3 - slope * dx / 3.0;
|
||||
y1 = y0 + (y2 - y0) / 2.0;
|
||||
|
@ -1014,8 +1015,7 @@ gimp_curve_plot (GimpCurve *curve,
|
|||
else if (p1 != p2 && p3 == p4)
|
||||
{
|
||||
/* see previous case */
|
||||
slope = (y3 - curve->points[p1].y) /
|
||||
(x3 - curve->points[p1].x);
|
||||
slope = (y3 - curve->points[p1].y) / (x3 - curve->points[p1].x);
|
||||
|
||||
y1 = y0 + slope * dx / 3.0;
|
||||
y2 = y3 + (y1 - y3) / 2.0;
|
||||
|
@ -1026,13 +1026,11 @@ gimp_curve_plot (GimpCurve *curve,
|
|||
* parallel to the line between the opposite endpoint and the adjacent
|
||||
* neighbor.
|
||||
*/
|
||||
slope = (y3 - curve->points[p1].y) /
|
||||
(x3 - curve->points[p1].x);
|
||||
slope = (y3 - curve->points[p1].y) / (x3 - curve->points[p1].x);
|
||||
|
||||
y1 = y0 + slope * dx / 3.0;
|
||||
|
||||
slope = (curve->points[p4].y - y0) /
|
||||
(curve->points[p4].x - x0);
|
||||
slope = (curve->points[p4].y - y0) / (curve->points[p4].x - x0);
|
||||
|
||||
y2 = y3 - slope * dx / 3.0;
|
||||
}
|
||||
|
|
|
@ -68,13 +68,13 @@ struct _GimpDataClass
|
|||
GimpViewableClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (* dirty) (GimpData *data);
|
||||
void (* dirty) (GimpData *data);
|
||||
|
||||
/* virtual functions */
|
||||
gboolean (* save) (GimpData *data,
|
||||
GError **error);
|
||||
gchar * (* get_extension) (GimpData *data);
|
||||
GimpData * (* duplicate) (GimpData *data);
|
||||
gboolean (* save) (GimpData *data,
|
||||
GError **error);
|
||||
const gchar * (* get_extension) (GimpData *data);
|
||||
GimpData * (* duplicate) (GimpData *data);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ gimp_drawable_colorize (GimpDrawable *drawable,
|
|||
{
|
||||
Colorize cruft;
|
||||
|
||||
colorize_init (&cruft);
|
||||
|
||||
gimp_colorize_config_to_cruft (config, &cruft);
|
||||
|
||||
gimp_drawable_process (drawable, progress, _("Colorize"),
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue