1. 17 Apr, 2019 3 commits
    • Ell's avatar
      app: in GimpCurveView, snap to curve when holding Ctrl · 8357c9ad
      Ell authored
      In GimpCurveView, when holding down Ctrl while adding/dragging a
      point, snap the y-coordinate to the original curve (at the start of
      the drag).  This is particularly useful for adding points along the
      curve, without changing their y-coordinate.
      Likewise, have the coordinate indicator show the snapped
    • Ell's avatar
      app: in GimpCurveView, use relative motion when dragging point · 0b9737a3
      Ell authored
      In GimpCurveView, when dragging an existing curve point, don't
      immediately move the point to the cursor position uppon button
      press, but rather move it relative to its current position as the
      cursor moves.  This allows selecting a point without moving it, and
      adjusting its position more easily.
      Additionally, when the cursor hovers above a point, or when
      dargging a point, have the coordinate indicator show the point's
      position, rather than the cursor's.
    • Ell's avatar
      app: add incremental mode to the Dodge/Burn tool · 83184d16
      Ell authored
      Add an "Incremental" option to the Dodge/Burn tool, which,
      similarly to the Paintbrush, Pencil, and Eraser tools, applies the
      effect incrementally as the pointer moves.
  2. 12 Apr, 2019 4 commits
    • Jehan's avatar
      app: new "gex" format (GIMP Extension). · 406279e4
      Jehan authored
      File extension (.gex) may still change if anything better is proposed.
      This format is currently just a compressed archive containing the
      extension data (plug-in, brushes or whatever) and the metadata file.
      For now, opening such file will simply install it as a new extension,
      keeping all file permissions and structure. Of course in the future, it
      will have to trigger a confirmation dialog.
      Currently the compression used is zip, which is just a first draft. This
      is not a decisive choice as well. We could use some tarball compressed
      in whatever other compression algorithm. I use libarchive as a new
      dependency to support unarchiving as it seems to be a common library
      (and since it is already used by AppStream-glib anyway, this doesn't add
      any actual dependency, just make it direct).
    • Jehan's avatar
      app: allow core file procedure which don't return an image. · 5c9114ae
      Jehan authored
      This is useful to be able to support file formats other than image
      formats. In particular I will use this in the next commit to support a
      "GIMP extension" format. When GIMP will open such file, it will
      install an extension (not open an image on canvas).
      This is an internal flag only, i.e. only usable from core GIMP. File
      formats which a plug-in can register are still only image file formats.
    • Michael Natterer's avatar
      app: remove defines GIMP_BRUSH_FILE_VERSION and GIMP_PATTERN_FILE_VERSION · aee6d44b
      Michael Natterer authored
      they were unused and wrong. Also clean up the brush and pattern
      headers a bit.
    • Jehan's avatar
      Issue #3224: Fill by Line Art Detection Bug (Fatal Error with Crash). · 5d5ced88
      Jehan authored
      Typos in gimp_pickable_contiguous_region_by_line_art().
      Thanks to Massimo for debugging these!
  3. 09 Apr, 2019 1 commit
  4. 06 Apr, 2019 1 commit
  5. 31 Mar, 2019 2 commits
    • Ell's avatar
      Issue #3025 - "File/New" doesn't honor "precision" choice ... · 033082dd
      Ell authored
      ... for "Edit/Preferences/Default Image"
      In GimpTemplateEditor, don't use gimp_prop_enum_combo_box_new() for
      the "Precision" combo-box, and rather synchronize the combo-box and
      the template manually, since we only want to update the "Gamma"
      combo-box according to the precision when it changes through the
      UI, and not when the template's precision otherwise changes.
      This fixes an issue where we'd always set the default gamma value
      when resetting the editor's template, overwriting the template's
      original gamma value.
    • Ell's avatar
      app: in GimpChunkIterator, avoid preparing rect before merging · c9550226
      Ell authored
      In GimpChunkIterator, avoid preparing the current rect before
      merging it back to the iterator's region, to save some work.
      Additionally, strengthen the iterator's invariants and simplify
  6. 30 Mar, 2019 5 commits
  7. 29 Mar, 2019 1 commit
  8. 28 Mar, 2019 6 commits
    • Ell's avatar
      app: avoid risky alloca() in gimp_brush_save() · 24ed9dbd
      Ell authored
      Replace an arbitrarily-sized g_alloca() with g_malloc() in
    • Ell's avatar
      app: avoid freezing image preview if drawable is not attached · de36e333
      Ell authored
      When freezing/thawing a top-level drawable's preview, only freeze/
      thaw the image preview if the drawable is attached.
    • Ell's avatar
      app: when freezing a drawable's preview, freeze ancestors' previews · e2ea2e4a
      Ell authored
      Add GimpViewable::preview_{freeze,thaw}() virtual functions, which
      get called when the viewable's preview is frozen/thawed.  Implement
      the functions in GimpDrawable, recursively freezing the parent
      drawable's preview (or the image's preview, for top-level
      drawables) while the drawable's preview is frozen.  For layer
      masks, freeze the associated layer's parent.
      This avoids updating layer-group/image previews while painting on,
      or applying a filter to, a descendant layer.  This both reduces
      lag, and fixes a discrepancy between the layer's preview, which
      isn't updated, and its parents' previews.
    • Jehan's avatar
      app: change antialias feature in fill by line art into Feather Edges. · d821b088
      Jehan authored
      This was actually more of a feathering feature I added earlier, and we
      already have a function for that: gimp_gegl_apply_feather(). This is
      using a gaussian blur, just as what I was doing anyway. This commit also
      adds the "Feather Radius" scale, similar to other tools with the
      "Feather Edges". So that makes it consistent (and more useful as you can
      adapt to your needs).
    • Ell's avatar
      app: include system gimp.css file in theme.css · 1846764d
      Ell authored
      Include the system-wide gimp.css file, in addition to the user-
      specific gimp.css file, in the generated theme.css file, instead of
      copying the former into the latter when creating the user's
      gimpdir.  This allows us to modify the system-wide gimp.css file,
      and having the changes take effect in existing installations.
    • Ell's avatar
      app: revert combo-box drop-down changes · 846d242f
      Ell authored
      Revert the use of gtk_combo_box_set_wrap_width() to change the
      combo-box drop-down style, except for the status-bar unit combo.
      See GNOME/gimp#2828 (comment 421312) for
      the rationale.
      This reverts commits 1d984542,
      68a33ab5, and
  9. 27 Mar, 2019 10 commits
    • Ell's avatar
      app: use gimp:fill-source in gimp_drawable_edit_fill() · 234f76b6
      Ell authored
      In gimp_drawable_edit_fill(), when performing a non-direct fill,
      use a GimpDrawableFilter with gimp:fill-source, added in the
      previous commit, instead of using gimp_drawable_apply_buffer() with
      an intermediate fill buffer.  This avoids allocating a full-size
      fill buffer, which may occupy a lot of space in pattern fills.
    • Ell's avatar
      app: add gimp:fill-source operation · 6b0337e3
      Ell authored
      Add a new gimp:fill-source operation, which can act as a source
      node for fill operations, instead of a fill buffer.  The op takes
      a GimpFillOptions object, a drawable, and a pattern offset, and
      uses gimp_fill_options_create_buffer() to produce its output.
      This allows performing the entire fill operation in chunks as a
      graph, instead of allocating a full-size fill buffer, which can
      can occupy a lot of space for pattern fills.
    • Ell's avatar
      app: improve gimp_drawable_fill_buffer() for patterns · 3c1634ee
      Ell authored
      In gimp_drawable_fill_buffer(), when the fill-source is a pattern,
      avoid going through an intermediate buffer when there's no profile
      transform, and use the destination-buffer format for the
      intermediate buffer, instead of the pattern format, when there is a
      profile transform.
    • Ell's avatar
      app: use compositing format for fill buffer · 245a17c7
      Ell authored
      Add gimp_fill_options_get_format(), which returns the format to be
      used for the fill buffer; this is the same format used during
      compositing.  Use this format in gimp_fill_options_create_buffer(),
      instead of the drawable format.
      This fixes the result of fill operations when the fill color/
      pattern is not representable in the drawable format, and speeds up
      color fills by avoiding color-conversion for the fill buffer during
    • Ell's avatar
      app: in GimpDrawableFilter, set underlying operation · b0dfc1e7
      Ell authored
      In GimpDrawableFilter, use
      gimp_gegl_node_set_underlying_operation() to the the input
      operation node as the underlying operation of the filter node.
    • Ell's avatar
      app: use underlying operation in gimp_gegl_apply_cached_operation() · 213b126c
      Ell authored
      In gimp_gegl_apply_cached_operation(), use the underlying
      operation, as returned from
      gimp_gegl_node_get_underlying_operation(), for testing whether the
      operation is a point operation, for the purpose of avoiding
      duplicating the input buffer.  Likewise, avoid duplicating the
      buffer when the underlying operation is a source operation.
    • Ell's avatar
      app: add gimp_gegl_node_{set,get}_underlying_oepration() · eb5e4736
      Ell authored
      ... which allow setting/getting the "underlying operation" node of
      a graph node.  For example, GimpDrawableFilter constructs a complex
      graph around a given operation node, which would be the underlying
      operation of the graph.  This allows querying the properties of the
      underlying operation, given only the graph.
      In recursive cases, gimp_gegl_node_get_underlying_operation()
      returns the most-nested underlying operation; when no underlying
      operation has been set, gimp_gegl_node_get_underlying_operation()
      returns the input node.
    • Ell's avatar
      app: add gimp_gegl_node_is_source_operation() · ff13e55c
      Ell authored
      ... which determines if a node is a source operation.
    • Ell's avatar
      app: in gimp_drawable_apply_buffer(), work in chunks · 8f845d3a
      Ell authored
      In gimp_drawable_real_apply_buffer(), use GimpChunkIterator to blit
      the applicator's output to the drawable's buffer in chunks, to
      minimize the space used for intermediate results.
    • Ell's avatar
      app: improve responsiveness of GimpChunkIterator · e904b712
      Ell authored
      In GimpChunkIterator, redajust the target area at each step,
      instead of at each iteration, to adapt more quickly to the current
      processing speed.  To avoid creating uneven chunks as a result,
      only change the chunk height at the beginning of rows, unless the
      resulting area would be more than twice as big as the target area.
  10. 26 Mar, 2019 1 commit
    • Ell's avatar
      app: preserve projection priority rect across structure/bounds changes · 9d80ccc3
      Ell authored
      In GimpProjection, store the priority rect in image coordinates,
      and only convert it to projectable coordinates when initializing
      the chunk-iterator's priority rect.  This allows us to preserve the
      priority rect across projectable structure/bounds changes.
  11. 25 Mar, 2019 2 commits
  12. 24 Mar, 2019 2 commits
  13. 20 Mar, 2019 2 commits
    • Ell's avatar
      Issue #3134 - Deleting last layer of group not updating image · a712308f
      Ell authored
      In gimp_group_layer_get_size(), make sure to always set *width and
      *height, even when the group is empty, so that when the function is
      called through gimp_projectable_get_size() by the group's
      projection, the correct size is reported.  This makes sure we
      update the correct area when the group becomes empty.
    • Ell's avatar
      app: improve gimpchannel-{combine,select} · 8e77347c
      Ell authored
      In gimpchannel-select, move some of the common functionality of the
      various gimp_channel_select_foo() functions to gimpchannel-combine.
      Furthermore, don't special-case CHANNEL_OP_INTERSECT, but rather
      pass it over to gimpchannel-combine, which is now prepared to
      handle it in all functions, as per the previous commits.
      In gimpchannel-combine, factor out the common functionality of the
      various gimp_channel_combine_foo() functions into a pair of
      gimp_channel_combine_{start,end}() functions, which are called
      before/after the actual gimp_gegl_mask_combine_foo() function,
      respectively.  In particular, these functions deal with calculating
      the new channel bounds.  Previously, the various
      gimp_gegl_mask_combine_foo() functions would implicitly invalidate
      the channel bounds (since commit
      d0ae244f), rendering the bounds-
      recalculation code ineffective.  This avoids manually recalculating
      the bounds in many cases, speeding up selection operations.