Commit Graph

44671 Commits

Author SHA1 Message Date
Michael Natterer 85591eb799 libgimpbase: add support for arrays of object IDs to gimpprotocol 2019-09-05 13:01:00 +02:00
Michael Natterer 0fefb7e922 libgimpbase: add GimpObjectArray and GimpParamSpecObjectArray 2019-09-05 13:01:00 +02:00
Michael Natterer 738b17063a libgimpbase: add an own struct for GimpStringArray
instead of re-using the GimpArray struct, which was confusing
particularly because of the meaning of the "length" member.
2019-09-05 13:01:00 +02:00
Ell 582930aa61 app: update image-projection priority rect when switching displays
Update the image-projection priority rect to the current display's
viewport when the display becomes active, so that the right region
is rendered first when switching between different displays of the
same image.
2019-09-05 13:55:56 +03:00
Ell 43e91d632e app: make "show canvas boundary" insensitive when "show all" is disabled
... since the canvas boundary is only shown in "show all" mode.
2019-09-05 13:19:52 +03:00
Ell 19817877a5 app: various fixes in gimp_display_shell_set_show_all() 2019-09-05 13:19:51 +03:00
Ell aab9f0ee10 app: fix a few compilation warnings 2019-09-04 20:51:43 +03:00
Ell b7674faef8 app: fix transform-tool preview/bounds in show-all mode when transforming entire image
In the transform tools, when transforming the entire image in show-
all mode, don't crop the preview and the transform bounds to the
size of the canvas.
2019-09-04 20:51:43 +03:00
Ell 32dd8d2d2e app: add support for show-all mode in GimpCanvasPassePartout
Don't clip the outer rect to the size of the canvas in show-all
mode.
2019-09-04 20:51:43 +03:00
Ell 1e621680f1 app: add support for show-all mode in GimpCanvasGrid
Don't crop the grid to the canvas size in show-all mode.
2019-09-04 20:51:43 +03:00
Ell 23617c943b app: add gimp_canvas_item_untransform_viewport()
... which untransforms the viewport from display space to the
item's coordinate space (i.e., scaled and translated image space).
2019-09-04 20:51:43 +03:00
Ell cf3638391d app: add support for color picking in "show all" mode
Add a show_all parameter to gimp_image_pick_color(), which, when
TRUE, allows picking colors outside the canvas bounds in sample-
merged mode.  Forward the display's "show all" mode through this
parameter where applicable (in particular, in the color-picker tool
and the pointer dockable).
2019-09-04 20:51:43 +03:00
Ell 02943e22f6 app: fix gimp_projection_get_pixel_at() for general bounding boxes 2019-09-04 20:51:43 +03:00
Ell da701ffc3a app: fix out-of-bounds rendering when alpha channel is invisible
When the image's alpha channel is invisible, paint regions outside
the image contents as black, instead of using a checkboard pattern.
This is especially notable when viewing the image in "show all"
mode.
2019-09-04 20:51:43 +03:00
Ell 915bdffb5a app: in GimpEditSelectionTool, freeze moved items' previews
... to avoid unnecessarily updating their previews while dragging,
and, in particular, to avoid updating the image's GimpImageViewable
size in show-all mode.
2019-09-04 20:51:43 +03:00
Ell a33f549896 app: show full image contents in GimpNavigationEditor
In GimpNavigation{Editor,View}, show the full image contents when
the corresponding display is in "show all" mode.  Additionally,
when the display's "show canvas boundary" is active, show the
canvas boundary in the navigation view as well.
2019-09-04 20:51:43 +03:00
Ell f90da765b5 app: handle GimpImageViewable in GimpViewRendererImage
Allow using a GimpImageViewable as the source for a
GimpViewRenderer, by allowing GimpViewRendererImage to handle this
type of viewables.
2019-09-04 20:51:43 +03:00
Ell bce4d32d75 app: add GimpImageViewable class
Add a new GimpImageViewable class, which acts as a proxy viewable
for an image.  Unlike the image itself, whose preview is always
restricted to the size of the canvas, a GimpImageViewable provides
a show-all property, which controls whether the preview includes
the full image contents.  We're going to use GimpImageViewable as
the source viewable for GimpNavigationView.
2019-09-04 20:51:41 +03:00
Ell a64dc8d618 app: defer GimpViewable::size-changed signal emission while frozen
In GimpViewable, defer emission of the size-changed signal while
the viewable's preview is frozen, and only emit the signal once
thawed.
2019-09-04 20:47:25 +03:00
Ell e2f31852fb app, menus: add "show canvas boundary" display option
Add a "show canvas boundary" display option, and a corresponding
"View" menu item and default-apperance preferences option.  When
enabled (the default), the canvas boundary is shown as an orange/
black dashed line in "show all" mode.
2019-09-04 20:47:25 +03:00
Ell a1717a90a9 app: improve display scroll/zoom-related behavior in "show all" mode
In "show all" mode, the image is thought to be "infinite"; this
commit improves the overall scrolling/zooming behavior in this mode
according to this assumption.  In cases where a specific image size
is needed (e.g., for the scrollbar bounds, fit-image-in-window,
etc.), the image's full bounding box is used; however, in cases
where a center point is needed (e.g., for the zoomed-out scrollbar
bounds, center-image-in-window), the canvas center, rather than the
bounding-box center, is still used.
2019-09-04 20:47:25 +03:00
Ell 788b136bbf app: add "clip" parameter to gimp_display_shell_untransform_viewport()
... which specifies whether to clip the viewport to the canvas
(previously, it would always be clipped).  Use the appropriate
value in all callers, depending on the shell's "show all" mode.  In
particular, this commit avoids clipping the image projection's
priority rect to the canvas in "show all" mode.
2019-09-04 20:47:25 +03:00
Ell 86dc451bce app, menus: add "show all" mode to GimpDisplayShell; "View -> Show All" toggle
Add a "show all" mode to GimpDisplayShell, controlled through a
corresponding "View -> Show All" menu item.  When enabled, the
entire image content is displayed, instead of cropping the image
to the canvas size.  More generally, the display behaves as if the
canvas were infinite.  The following commits improve the overall
behavior in this mode.

Add a prefernces option to control the default "show all" state.
2019-09-04 20:47:21 +03:00
Ell a9d0643992 app: in preferences dialog, add "show sample points" toggle
... to the default-appearance options.  It was previously missing.
2019-09-04 19:19:42 +03:00
Ell 4e8fa88705 app: in preferences dialog, swap position of default-appearance columns
... to match their menu order.
2019-09-04 19:19:41 +03:00
Ell 697ab6a91a app: in GimpImage, ignore "show all" when image used as pickable
In GimpImage, make sure the image's pickable interface keeps
behaving as before (i.e., restricted to the canvas size), even when
the image is in "show all" mode.  In contrast, the image's
projection, when used as a pickable, *is* affected by "show all".
2019-09-04 19:16:42 +03:00
Ell 1f9d0d275c app: add gimp_image_invalidate_all()
... which invalidates the entire image.  This replaces all calls to
gimp_image_invalidate() with the full canvas size, since the image
content can now be larger than the canvas.
2019-09-04 19:16:42 +03:00
Ell 7f629a630c app: add "show all" mode to GimpImage
Add a "show all" mode to GimpImage, which, when active, causes the
image projection's bounding box to be adjusted dynamically to the
combined bounding box of all layers and the canvas.  This mode is
controlled through the new gimp_image_{inc,dec}_show_all()
functions, which should be called by the display; a corresponding
display toggle will be added in the following commits.

Note that from the user's perspective, "show all" is a display
mode, rather than an image mode.  The GimpImage "show all" mode is
therefore merely an implementation detail, and shouldn't have any
effect on displays that don't use "show all" mode, or the PDB.
The ability to use the image with or without taking its "show all"
mode into account will be facilitated by the next commits.
2019-09-04 19:16:41 +03:00
Ell bcf2b937d9 app: notify GimpProjection::buffer when freeing the projection's buffer
... instead of only when subsequently reallocating it, so that
listeners can respond to the buffer being freed.
2019-09-04 19:16:41 +03:00
Ell 49bbf13911 app: in GimpProjection, avoid invalidating preview on flush while rendering
In GimpProjection, avoid erroneously invalidating the projectable's
preview when flushing the projection and there's nothing to be
flushed, if the chunk renderer is still running, and hence the
projection is not fully rendered yet.
2019-09-04 19:16:40 +03:00
Ell 564afeda8b app: in gimp_gegl_buffer_set_extent(), clear full OOB region
In gimp_gegl_buffer_set_extent(), clear the full now-out-of-bounds
region of the buffer, instead of only full out-of-bounds tiles;
however, we still make sure to clear full tiles, instead of partial
tiles, as much as possible.  This prevents (parts of) the old
content of the buffer from showing when it's enlarged again.  This
is especially relevant for the image projection, once we add
support for a dynamically-expanding canvas in the following
commits, since the projection of a reexpanded buffer can be
temporarily rendered to the display before it's fully
reconstructed, exposing parts of the old content.
2019-09-04 19:16:40 +03:00
Michael Natterer 7019eaa56b app, libgimp: share the code of libgimp/gimpparamspecs.c with app/
move the code to gimpparamspecs-body.c and include it from both app/
and libgimp/. They are the same apart from a minor difference which we

Also share the entire libgimp/gimpparamspecs.h header with the core.
2019-09-04 16:48:26 +02:00
Michael Natterer 18bdf52a0b libgimp: remove redundant validation code from gimpparamspecs.c
No GimpParamSpecItem subclass needs its own validate function,
checking against pspec->value_type and gimp_item_is_vaid() in
gimp_param_item_validate() is good enough, no item ID can change its
type during the lifetime of the proxy.
2019-09-04 16:34:24 +02:00
Michael Natterer b92dd2c8e3 app: split GimpDisplay in two classes: GimpDisplay and GimpDisplayImpl
GimpDisplay contains only the ID logic and the "gimp" and "config"
pointers, and lives in the core.

GimpDisplayImpl is a subclass and contains all the actual display
stuff. The subclass is only an implementation detail and doesn't
appear in any API.

Remove all hacks which pass displays as gpointer, GObject or
GimpObject through the core, or even lookup its type by name,
just use GimpDisplay.
2019-09-04 14:30:43 +02:00
Michael Natterer b3b3d8160c app, libgimp: don't duplicate _gimp_gp_param_def_to_param_spec()
they are virtually the same now (except GimpParamEnum, but that one is
still the same because its special feature doesn't go over the wire).
2019-09-04 10:41:19 +02:00
Michael Natterer 3fd3344f80 plug-ins: script-fu lost all support for images, layers etc.
due to the recent change to actual objects instead of IDs,
so add object support to script_fu_marshal_procedure_call().
2019-09-04 10:28:50 +02:00
Michael Natterer 5e00decc13 pdb, libgimp: use GIMP_VALUES_GET,DUP_FOO() in the libgimp PDB wrappers 2019-09-04 02:49:33 +02:00
Michael Natterer c6082b37f8 libgimp: add missing stuff to gimpprocedure-params.h
Add some accessors, and the complete set of macros for GimpParasite
and GParamSpec.
2019-09-04 02:39:02 +02:00
Michael Natterer cb24709916 pdb: remove the "id" field from all pdb types, it's now unused 2019-09-04 02:10:43 +02:00
Michael Natterer 90f9d551dc pdb, libgimp: use GIMP_VALLUES_GET_ENUM() in libgimp PDB wrappers
to get the procedure's return status.
2019-09-04 01:49:35 +02:00
Michael Natterer feaf96735f pdb: don't return any strings from _gimp_pdb_proc_info()
and instead add _gimp_pdb_proc_documentation() and
_gimp_pdb_proc_attribution().

Remove the gimp_pdb_proc_info() utility function in app/.
2019-09-04 01:38:31 +02:00
Michael Natterer d0f00bb76d devel-docs: update the libgimp and libgimpbase docs 2019-09-04 00:12:03 +02:00
Michael Natterer a351ce9126 Remove the entire old plug-in interface 2019-09-04 00:03:12 +02:00
Michael Natterer 7257cc8abc plug-ins: port curve-bend to GimpPlugIn... IT'S DONE YEAH 2019-09-03 23:29:21 +02:00
Michael Natterer f405b45058 plug-ins: port sample-colorize to GimpPlugIn 2019-09-03 22:51:18 +02:00
Michael Natterer bdbe1ee06d plug-ins: port sparkle to GimpPlugIn 2019-09-03 22:16:39 +02:00
Michael Natterer 5c5b4642b1 plug-ins: port warp to GimpPlugIn 2019-09-03 21:30:27 +02:00
Michael Natterer 4ded322edf plug-ins: port map-object to GimpPlugIn 2019-09-03 21:00:23 +02:00
Michael Natterer 9e3359c659 plug-ins: port lighting to GimpPlugIn 2019-09-03 19:58:18 +02:00
Michael Natterer 5154b27108 plug-ins: port depth-merge to GimpPlugIn 2019-09-03 19:22:42 +02:00