1. 15 Jul, 2018 1 commit
    • Ell's avatar
      app: fix line-angle constraint when xres != yres · 4cb91320
      Ell authored
      Fix gimp_constrain_line() and friends to properly constrain line
      angles when the image's horizontal and vertical resolutions are
      different, and dot-for-dot is disabled.
      (cherry picked from commit 4fefab17)
  2. 12 Jul, 2018 1 commit
  3. 11 Jul, 2018 1 commit
  4. 06 Jul, 2018 1 commit
  5. 03 Jul, 2018 1 commit
  6. 25 Jun, 2018 1 commit
    • Michael Natterer's avatar
      Issue #1714 - When GIMP starts, default brush hardness is always at 100 · f1ffb06c
      Michael Natterer authored
      We should not have essential signal connections (such as setting tool
      options from brush properties) implemented in the tool options GUI
      files, because they are not active until the options GUI is created.
      Also, that magic is simply too hidden in the options GUI files.
      Move the signal connections and the brush property copying code to
      gimppaintoptions.c where is can also be done cleaner.
      However, this must only be done for the main tool options instance
      that is used for the GUI. Therefore, add a "gui_mode" boolean to
      GimpToolOptions and set it to TRUE for all main tool options.
      (this is ugly, but much less ugly and much less hidden than all the
      places where code lives (like tool_manager.c) that can now be moved
      into GimpToolOptions and its subclasses, and implemented cleanly
      (cherry picked from commit cb0e6c65)
  7. 21 Jun, 2018 1 commit
  8. 17 Jun, 2018 1 commit
    • Ell's avatar
      Issue #1668 -- Smudge Tool - Wrong colors when painting on an image ... · 226ea886
      Ell authored
      ... with a color profile other than the gimp built-in.
      When initializing the smude tool's accum buffer, use
      gimp_pickable_get_pixel_at(), instead of
      gimp_pickable_get_color_at(), for picking the initial color to fill
      the buffer with, so that we don't erroneously apply the image's
      color tranform to it when the image has a profile.  Previously,
      this would result in wrong colors when painting from the drawable
      edges inward, with flow < 100%.
      (cherry picked from commit 5a07876c)
  9. 01 Jun, 2018 1 commit
  10. 25 May, 2018 1 commit
  11. 16 May, 2018 1 commit
    • Ell's avatar
      Bug 796153 - Airbrush doesn't paint on timeout, and crashes with dynamics · 23dab431
      Ell authored
      gimp_airbrush_stamp(), which is called during the airbrush timeout
      to periodically stamp the airbrush, assumes the saved symmetry's
      origin is the same as during the original call to
      gimp_airbrush_paint().  However, since commit
      bc09c718, we clear the symmetry's
      origin at the end of gimp_paint_core_paint(), resulting in an empty
      symmetry with a NULL origin during gimp_airbrush_stamp().  As a
      result, no dab is painted, and we segfault if there's active
      Fix this by saving the symmetry's origin coords during
      gimp_airbrush_paint(), and restoring them in gimp_airbrush_stamp().
  12. 08 May, 2018 1 commit
    • Ell's avatar
      Bug 795909 - Multiple images opened with floating selection ... · bc09c718
      Ell authored
      ... closing one of them crashes GIMP
      GimpSymmetry keeps a strong reference to the drawable passed to
      gimp_symmetry_set_origin() until the next call to set_origin(), or
      until it's destroyed.  This can unnecessarily extend the lifetime
      of the drawable.  In particular, it can extend the lifetime of a
      floating selection past the destruction of the image mask, during
      image destruction, which results in a NULL mask pointer in
      gimp_layer_invalidate_boundary(), called when detaching the
      floating selection as part of its destructor.
      Add gimp_symmetry_clear_origin(), which clears the origin set using
      gimp_symmetry_set_origin(), dropping the reference to the drawable,
      and call it in gimp_paint_core_paint() after painting.  This avoids
      extending the lifetime of the drawable, and fixes the bug.
  13. 25 Apr, 2018 1 commit
  14. 19 Apr, 2018 1 commit
    • Ell's avatar
      app: refactor gimppaintcore-loops to coalesce iteration · f2a1fd5b
      Ell authored
      The gimppaintcore-loops functions perform very little actual
      computational work (in case of do_layer_blend(), at least for
      simple blend modes), which makes the cost of buffer iteration, and
      memory bandwidth, nonnegligible factors.  Since these functions are
      usually called in succession, acessing the same region of the same
      buffers, using the same foramts, coalescing them into a single
      function, which performs all the necessary processing in a single
      step, can improve performance when these functions are the
      Add a gimp_paint_core_loops_process() function, which does just
      that: it takes a set of algorithms to run, and a set of parameters,
      and performs all of them in one go.  The individual functions are
      kept for convenience, but are merely wrappers around
      Be warned: the implementation uses unholy C++ from outer space, in
      order to make this (sort of) managable.  See the comments for more
  15. 18 Apr, 2018 1 commit
    • Ell's avatar
      app: fix airbrush periodic stamp behavior · 542a0473
      Ell authored
      Commit ddfc7715 changed the
      airbrush periodic stamp behavior, so that instead of using the main
      brush, it issued a full MOTION event, potentially using a different
      brush when using a GIH brush.
      Fix this, by renaming the "timeout" signal of GimpAirbrush to
      "stamp", and by adding a new gimp_airbrush_stamp() function, which
      should be used for painting the periodic airbrush dab in response,
      instead of calling gimp_paint_core_paint() directly, and which
      calls gimp_airbrush_paint() instead, as the old code did.
      In order to call this function from the paint thread, we replace
      the various gimp_paint_tool_paint_core_foo() functions, introduced
      in the above commit, with a generic gimp_paint_tool_paint_push()
      function, which takes a callback (and a data pointer) to run on the
      paint thread, and queues it for execution (when not using the paint
      thread, the function is called directly from the calling thread.)
  16. 16 Apr, 2018 1 commit
    • Ell's avatar
      app: make the airbrush tool thread-safe w.r.t. paint thread · ddfc7715
      Ell authored
      GimpAirbrush currently performs painting and flushes the image on
      its own during the airbrush timeout.  This is unsafe w.r.t. the
      paint thread, since the timeout is run on the main thread, while
      paint commands should run on the paint thread.
      Add a "timeout" signal to GimpAirbrush, and simply emit this signal
      during the airbrush timeout, rather than actually painting.
      Connect to this signal in GimpAirbrushTool, and use
      gimppaintool-paint to perform the actual painting, in a thread-safe
      manner (see the previous commit.)
  17. 13 Apr, 2018 3 commits
  18. 11 Apr, 2018 1 commit
    • Jehan's avatar
      Bug 768872 - Tiling Symmetry doesn't wrap vertical coordinates over... · 1993d8a4
      Jehan authored
      ... edges for MyPaint brush.
      Adding the concept of "stateful" symmetry when a tool needs to make sure
      of corresponding stroke numbers and orders while painting (i.e. stroke N
      at time T+1 is the continuation of stroke N at time T). This is the case
      for the MyPaint brushes and the ink tool.
  19. 08 Apr, 2018 1 commit
  20. 05 Apr, 2018 5 commits
  21. 04 Apr, 2018 2 commits
  22. 01 Apr, 2018 1 commit
  23. 31 Mar, 2018 1 commit
  24. 25 Mar, 2018 1 commit
    • Massimo Valentini's avatar
      app: various speedups to gimp_brush_core_color_area_with_pixmap() · f561231e
      Massimo Valentini authored
      In gimp_brush_core_color_area_with_pixmap(), use the native area
      format when painting the brush, instead of always going through
      "RGBA float", and create the pixmap -> area fish only once, instead
      of once per scanrow.
      In gimp_brush_core_paint_line_pixmap_mask(), avoid modulus
      calculation at each pixel.
      See bug #694917.
  25. 12 Feb, 2018 2 commits
    • Ell's avatar
      Bug 793392 - Issue when painting with some layer modes ... · 1be00225
      Ell authored
      ... on perceptual gamma image
      When constructing the paint core's paint buffer, in GimpBrushCore
      and GimpInk, use the drawable's format as the preferred format in
      the call to gimp_layer_mode_get_format(), instead of NULL.
      Subsequently, use the paint buffer's format, instead of the source
      buffer's format, as the preferred iterator format in
      do_layer_blend(), since the iterator format must match the paint
      buffer format.
    • Michael Natterer's avatar
      Bug 783755 - Smudge should blend the smudged colors using linear RGB · 6f324b86
      Michael Natterer authored
      This reverts commit 94c6bb46, because
      unlike what the bug title suggests, Smudge apparently *should* use
      perceptual RGB, so now everything works as before.
  26. 11 Feb, 2018 1 commit
  27. 03 Jan, 2018 1 commit
  28. 22 Dec, 2017 5 commits
    • Piotr Drąg's avatar
      app: fix a typo (realtive) · 4df282a6
      Piotr Drąg authored
    • Ell's avatar
      Bug 753412 - New Canvas rotation feature rotates brush. · eded91e1
      Ell authored
      Replace the "lock brush size to zoom" paint option with a "lock
      brush to view" option, which links the entire brush transform to
      the view transform, so that the brush remains invariant in display
      space under scaling, rotation, and reflection.
    • Ell's avatar
      app: add support for brush reflection · a0b73420
      Ell authored
      Add support for reflecting brushes as part of their transformation.
      The reflection is performed as the last step of the transformation,
      across the vertical axis.
      The option to reflect the brush is not exposed in the UI, or
      through the PDB, but is intended to be used for linking the brush
      transformation to the view transformation, in the next commit.
    • Ell's avatar
    • Ell's avatar
      app: constrain line angles in display space, not image space · 984ed6ce
      Ell authored
      Add an offset_angle parameter to gimp_constrain_line(), which
      offsets the radial lines by a given angle.
      Add gimpdisplayshell-utils.[ch], with two new functions:
        - gimp_display_shell_get_constrained_line_offset_angle():
          Returns the offset angle to be passed to
          gimp_constrain_line(), in order to constrain line angles in
          display space, according to the shell's rotation angle and
          flip mode.
        - gimp_display_shell_constrain_line():  A convenience function
          which calls gimp_constrain_line() with the said offset angle.
      Use the new functions in all instances where we constrain line
      angles, so that angles are constrained in display space, rather
      than image space.
      The only exception is GimpEditSelectionTool, which keeps
      constraining angles in image space, since it's not entirely obvious
      that we want to constrain angles of dragged layers/selections in
      display space.