1. 16 Oct, 2017 2 commits
    • Ell's avatar
      app: add custom gui for gegl:color-to-alpha(-plus) · d4d8dbbc
      Ell authored
      Add a specialized propgui constructor for gegl:color-to-alpha-plus.
      This op is currently in the workshop, but is set to be merged with
      the existing gegl:color-to-alpha, so we omit the '-plus' from file-
      and function-names.
      The new op adds a pair of properties to control the radii, relative
      to the selected color, below which colors become fully transparent,
      and above which colors remain fully opaque.  Allow these properties
      to be set by picking a color from the image, and calculating the
      radius accordingly.
    • Ell's avatar
      app: allow specifying a callback function for propgui pickers · c5b88702
      Ell authored
      Allow propgui constructors to specify an (optional) callback function
      when creating pickers, to be called when a color/coordinate is picked,
      similarly to controller callbacks.
      Implement picker callback support in GimpFilterTool.  When the active
      picker has an associated callback function, call it instead of the
      class's color_picked() function.
      Add lots of "#include <gegl.h>" to .c files that miss it, which is
      now necessary, since this commit adds a Babl* parameter in
  2. 15 Oct, 2017 2 commits
  3. 14 Oct, 2017 2 commits
  4. 11 Oct, 2017 2 commits
  5. 10 Oct, 2017 4 commits
  6. 09 Oct, 2017 28 commits
    • Ell's avatar
    • Jordi Mas's avatar
      Update Catalan translation · c465e17e
      Jordi Mas authored
    • Ell's avatar
      app: in GimpOperationBlend, swap leftmost and rightmost colors when ... · a789c6e5
      Ell authored
      ... rendering a reversed gradient
      Finishes up the last commit.
    • Ell's avatar
      app: fix leftmost and rightmost gradient colors in GimpOperationBlend · 4e2e60ca
      Ell authored
      When rendering a gradient with a repeat mode of NONE, don't sample
      the gradient at 0.0 and 1.0, for pixels that lie to the left and to
      the right of the gradient, respectively.  Instead, use the left
      color of the leftmost segment directly, and, likewise, the right
      color of the rightmost segment.  This always gives us the right
      color for such pixels, even when there are gradient stops, that may
      use different colors, at 0.0 and 1.0,
    • Ell's avatar
      app: cache last-sampled gradient segment in GimpOperationBlend · dfeafcb1
      Ell authored
      Remember the gradient segment at which the most-recent sample lies,
      and pass it to gimp_gradient_get_color_at() as a seed for segement
      lookup on the next sample.  This improves the performance
    • Ell's avatar
      app: don't update blend tool filter upon irrelevant line changes · 4bfa6e71
      Ell authored
      When one of the line widget's properties changes, only update the
      blend tool filter if the property has an effect on the result.  In
      particular, don't update the filter when only the selection
    • Ell's avatar
      app: fix fg/bg color change handling in the blend tool · 429bc550
      Ell authored
      Separate the handling of changes to the FG/BG color from the gradient
      dirty signal handling, so that the gradient editor doesn't purge the
      history in response.  Additionally, correctly respond to such changes
      whenever the gradient has segments that depend on the FG/BG colors,
      even if the dependency is introduced after the gradient is selected.
    • Ell's avatar
      app: implement tool undo for gradient editing in the blend tool · 4f6b4d27
      Ell authored
      Move the tool undo functionality of the blend tool to the editor,
      and add support for undoing gradient edit operations.  Each undo
      step that affects the gradient holds, in addition to the line
      endpoint poisitions, a copy of the gradient at the beginning of the
      operation, as well as necessary information to allow the selection
      to "follow" undo.  When undoing the operation, the saved gradient
      is copied back to the active gradient.
      To avoid all kinds of complex scenarios, when the active gradient
      changes, or when the gradient is modified externally (e.g., by the
      (old) gradient editor), all undo steps that affect the gradient are
      deleted from the history, while those that affect only the endpoint
      positions are kept.
    • Ell's avatar
      app, libgimpbase: implement blend tool gui for gradient midpoints · 9469ac26
      Ell authored
      Allows setting the midpoint's position, blending function, and
      coloring type.
      The midpoint can be converted to a stop, and centered, through
      editor buttons.
    • Ell's avatar
      app: implement blend tool gui for gradient stops · 1aa48774
      Ell authored
      Allows setting the stop's position, and its left and right colors
      and color types.  A chain button can be used to modify the two
      colors (and color types) together.
      The stop can be deleted through an editor button.
    • Ell's avatar
      app: implement blend tool gui for gradient endpoints · 8d12fada
      Ell authored
      Allows setting the endpoint's position, its color, and its color
    • Ell's avatar
      app: add tool gui to the blend tool · a9ca354d
      Ell authored
      To be used by the blend tool gradient editor to edit the gradient
      endpoint/stop/midpoint properties corresponding to the selected
      The GUI is currently empty; the following commits add its contents.
    • Ell's avatar
      app: convert midpoints to stops via double-click in the blend tool · 420ea803
      Ell authored
      When a midpoint is double-clicked, convert it into a gradient stop
      (i.e., split the corresponding segment at the midpoint,) by
      responding to the line's handle-clicked signal.
    • Ell's avatar
      app: handle prepare-to-remove-slider signal in the blend tool · 63c8fc73
      Ell authored
      Add a tentative_gradient member to GimpBlendTool, which, when set,
      is displayed instead of the current gradient.
      Use this to show a version of the gradient with the currently
      selected stop deleted, upon receiving a prepare-to-remove-slider
      signal, i.e., when the slider is about to be removed.
    • Ell's avatar
      app: add support for removing gradient stops to the blend tool · 9ae09fb0
      Ell authored
      ... by responding to the line's remove-slider signal.
    • Ell's avatar
      app: add support for adding gradient stops to the blend tool · 29bae454
      Ell authored
      ... by responding to the line's can-add-slider and add-slider
    • Ell's avatar
      app: modify the gradient in response to blend-tool slider motion · 690f51d4
      Ell authored
      Update the gradient's segment endpoint and midpoint positions,
      according to the sliders.
    • Ell's avatar
      app: add sliders for gradient stops and midpoints in the blend tool · ac1b7887
      Ell authored
      They can't be used to modify the gradient yet, but soon...  Very
    • Ell's avatar
      app: add "modify active gradient" option to the blend tool · 4f1195be
      Ell authored
      Add a boolean "modify active gradient" option to the blend tool.
      when checked, the active gradient is modified in-place while edited.
      When unchecked, the active gradient is copied to the internal
      "custom" gradient upon editing, and the custom gradient becomes
      subsequently active.
      Show a hint when the option is checked, but the active gradient is
      non-writable, and can't be edited directly.
      This commit adds the new gimpblendtool-editor.[hc] files, which are
      where the gradient-editing related functionality of the blend tool
      is going to go.
    • Ell's avatar
      app: add "instant mode" option to the blend tool · f95f8eb3
      Ell authored
      Add a boolean "instant mode" option to the blend tool, togglable
      using shift.  When checked, commit the gradient immediately when
      the mouse is released.
      When not in instant mode, don't commit the gradient when clicking
      outside the line, since this will become easy to do accidentally
      once we add on-canvas gradient editing.
    • Ell's avatar
      app: don't show a PLUS cursor modifier before starting the blend tool · 02ad016b
      Ell authored
      We're going to use the PLUS modifier for adding gradient stops.
    • Ell's avatar
      app: add gimp_color_panel_dialog_response(); add "response" signal · 5d2555bd
      Ell authored
      Add gimp_color_panel_dialong_response() to GimpColorPanel, which
      emits a response for the color panel's color dialog, if shown.
      Add a "response" signal to GimpColorPanel, which is emitted upon
      color dialog response.
      In both cases, the response is a GimpColorDialogState, which should
      an actual dialog response id.
    • Ell's avatar
      app: use get_{left,right}_flat_color() in gradient editor · 32de4878
      Ell authored
      Use gimp_gradient_get_{left,right}_flat_color(), instead of
      gimp_gradient_get_color_at(), to get the selection endpoints'
      colors in the gradient editor, so that the correct colors are used
      under any condition (in particular, if there are 0-length
    • Ell's avatar
      app: improve curved gradient segment sampling · 1f3030eb
      Ell authored
      Improve the sampling performance of curved gradient segments, and
      its behavior when the segment's midpoint is close to one of its
    • Ell's avatar
      app: improve num. stability of gimp_gradient_segment_range_compress() · 1b2a395e
      Ell authored
      When using gimp_gradient_segment_range_compress() to expand a 0-
      length segment, redistribute the range's endpoints and midpoints
      uniformly, rather than using the regular code path, which would
      result in NaN values.
      Make sure that the left and right endpoints of the range are
      *exactly* equal to the new left and right values.  Previously,
      they could be slightly off due to numerical errors.
    • Ell's avatar
      app: treat gradient segments as clopen ranges · 3aff0a1a
      Ell authored
      Treat gradient segment exents as [left, right) ranges, instead of
      [left, right], so that they don't overlap, and each point
      corresponds to a unique color.
      Perform less comparisons in gimp_gradient_get_segment_at_internal().
    • Ell's avatar
      app: add gimp_gradient_segment_range_merge() · d710773a
      Ell authored
      ... which merges a segment range into a single segment, that spans
      the entire range, and has the same endpoint colors.  The merged
      segment's midpoint is at its center, and its blend function and
      coloring type are those of the range's segments if they're uniform,
      or the default ones otherwise.
    • Ell's avatar
      app: add gimp_gradient_segment_range_get_n_segments() · 082f6a41
      Ell authored
      ... which returns the number of segments in a range.