1. 07 Feb, 2019 5 commits
    • Jehan's avatar
      app: improve line art bucket fill by filling unsignificant areas. · 72092fbd
      Jehan authored
      The line art imaginary segments/splines are not added when they create
      too small zones, unless when these are just too small ("unsignificant").
      Why the original algorithm keeps such micro-zones is because there may
      be such zones created when several splines or segments are leaving from
      a same key point (and we don't necessarily won't to forbid this). Also
      we had cases when using very spiky brushes (for the line art) would
      create many zones, and such micro-zones would appear just too often
      (whereas with very smooth lines, they are much rarer, if not totally
      absent most of the time).
      Also it is to be noted that the original paper would call these
      "unsignificant" indeed, but these are definitely significant for the
      artists. Therefore having to "fix" the filling afterwards (with a brush
      for instance) kind of defeat the whole purpose of this tool.
      I already had code which would special-case (fill) 1-pixel zones in the
      end, but bigger micro zones could appear (up to 4 pixels in the current
      code, but this could change). Also I don't want to use the "Remove
      Holes" (gimp:flood) operation as I want to make sure I remove only
      micro-holes created by the line art closure code (not micro-holes from
      original line arts in particular).
      This code takes care of this issue by filling the micro-holes with
      imaginary line art pixels, which may later be potentially bucket filled
      when water-filling the line art.
    • Ell's avatar
      app: fix gimp_babl_compat_u8_mask_format() · 55f963cb
      Ell authored
      ... post space-invasion
    • Jehan's avatar
      Issue #2920: Dilate and Erode filters' tooltips are untranslatable. · f8f3a749
      Jehan authored
      Wrong message contexts!
    • Ell's avatar
      app, pdb: use compat formats for brushes/patterns in plug-ins · 82c44949
      Ell authored
      Plug-ins are not prepared to handle high-precision brushes/
      patterns, even when they're otherwise aware of high-precision
      drawables, so make sure to always use compat formats when
      communicating brush/pattern data to plug-ins.
      Allowing plug-ins to handle high-precision brush/pattern data would
      require some additional API.
    • sabri ünal's avatar
      2 sentences are marked as translatable. · 18537706
      sabri ünal authored
      These sentences are in use on "Preferences - Interface - Help System" page.
  2. 06 Feb, 2019 4 commits
    • Ell's avatar
      app: avoid unnecessary calls to gimp_temp_buf_data_clear() · 9d19e804
      Ell authored
      Avoid unnecessary calls to gimp_temp_buf_data_clear() in various
      places, where either the entire buffer is being written to, or most
      of it is, only requiring clearing the edges.
    • Ell's avatar
      app: small fix in gimpbrushcore-kernels.h · cbe40000
      Ell authored
    • Ell's avatar
      Issue #2372 - Reduced quality of the Parametric brush in 2.10 · 8ef1113d
      Ell authored
      Promote the precision of generated brushes to 32-bit float, and
      modify brush preview generation, and gimpbrushcore-loops, to handle
      float brushes.  This avoids posterization in large brushes.
      Note that non-generated brushes are still uint8.
    • Ell's avatar
      app: add gimp_temp_buf_{lock,unlock}() · 12dde445
      Ell authored
      In GimpTempBuf, add gimp_temp_buf_lock() and gimp_temp_buf_unlock()
      functions, which lock/unlock the buffer for data access.  Unlike
      gimp_temp_buf_get_data(), which returns a direct pointer to the
      buffer's data, the new functions take a format parameter and may
      return a temporary buffer, allowing the buffer to be accessed using
      an arbitrary format.
  3. 05 Feb, 2019 2 commits
    • Jehan's avatar
      app, libgimpbase: --enable-relocatable-bundle replaces --enable-binreloc · 4d84c1d7
      Jehan authored
      Older --enable-binreloc configure option had basically the same purpose
      as the newer --enable-relocatable-bundle, though the old binreloc was
      only used for gimpenv.c code.
      As a consequence, commit 10ce7021 was still not working fine since
      gimp_installation_directory_file() also need binreloc enabled (to be
      actually relocatable).
      Let's get rid of this whole mess, by implying we want binreloc code to
      be used when --enable-relocatable-bundle is ON. We don't need the
      m4macros anymore, since AM_BINRELOC was basically just checking that
      `/proc/self/maps` was present. But anyway being present at compile time
      does not mean it will be at runtime (nor the opposite). So this test is
      not that useful. The binreloc code will anyway fallback gracefully to
      the non-binreloc code (i.e. trying to use build-time install paths) if
      the procfs is lacking at runtime.
    • Ell's avatar
      app: in GimpRotateTool, improve fuzzy comparisons · b002f204
      Ell authored
  4. 04 Feb, 2019 11 commits
    • Ell's avatar
      app: in GimpTransformGridTool, allow linking forward/backward transforms · 39e23267
      Ell authored
      Add a GimpTransformGridTool::matrix_to_info() virtual function,
      which should extract the tool-specific transformation parameters
      given a transformation matrix, and the old parameter set (which is
      needed in some tools, to derive the parameters that aren't encoded
      in the matrix, such as the pivot point).  The transformation matrix
      can be any combination of matrices calculated by the tool, and
      their inverses.  Subclasses should only implement this function if
      every such matrix can be mapped back to transformation parameters.
      This is currently the case for all the transform-grid tools, except
      for the shear tool (since it only supports shearing along one of
      the horizontal or the vertical directions, however, the combined
      matrix may require shearing in both directions).
      When a transform-grid tool implements this function, show a chain-
      button between the two transform-direction radio-buttons in the
      tool options.  When the chain-button is linked, whenever the
      transform corresponding to the active direction is modified, adjust
      the transform corresponding to the non-active direction such that
      the overall transform remains the same.
      One notable workflow that this enables is transforming a layer
      while adjusting a different area than its boundary, by first
      defining the area while the transform-directions are linked, and
      then transforming the area while the transform-directions are
    • Ell's avatar
      app: in GimpTransformGridTool, allow simultaneous forward and backward transforms · de8e81f8
      Ell authored
      In GimpTransformGridTool, allow performing simultaneous forward
      (normal) and backward (corrective) transforms, by having each
      transform direction operate on an independent set of parameters.
      In other words, whereas the transform-grid tools previously had a
      single transform, which could be applied either normally or
      correctively using the "direction" tool-option, they now have two
      independent transforms, one applied normally and the other
      applied correctively, which are toggled using the "direction"
      option.  The overall transform is the combination of the backward
      transform, followed by the forward transform.
      Another way to think about it, is that the tool transforms a source
      shape into a destination shape.  The source shape is defined by the
      backward transform, and the destination shape is defined by the
      forward transform.  Wherewas previously only one of these shapes
      could be controlled (the other shape always being the item bounds),
      it's now possible to control both shapes in a single transform.
      The next commit will allow modifying both shapes simultaneously,
      making this even more useful.
      Note that since both transforms start off as the identity, using
      only one of the transform directions has the same behavior as
    • Ell's avatar
      app: add GimpTransformToolClass::undo_desc field · d5494406
      Ell authored
      Add an undo_desc field to GimpTransformToolClass, which subclasses
      should set to the tool's default undo description.  Provide a
      default implementation for the get_undo_desc() vfunc, which returns
      (a copy of) undo_desc.  This simplifies transform tools that have a
      static undo descrption, as well as provides a fallback when a
      detailed undo description can't be generated (not currently
      relevant, but will be used in the next commit).
    • Ell's avatar
      app: improve rotate-tool undo description · 44c8a1f2
      Ell authored
      When rotating an item around its center using the rotate tool,
      i.e., if the pivot point hasn't been moved, don't include the pivot
      coordinates in the undo description.
    • Ell's avatar
      app: improve measure-tool undo description · b95bf3fb
      Ell authored
      When straightening an item using the measure-tool, include the
      orientation and angle in the undo description.
    • Ell's avatar
      app: add GimpToolCompass::effective-orientation property · 40c09131
      Ell authored
      In GimpToolCompass, add a read-only "effective-orientation"
      property, which returns the actual orientation of the compass; in
      particular, if the "orientation" property is set to AUTO,
      "effective-orientation" returns HORIZONTAL or VERTICAL, depending
      on the current compass direction.  In 3-point mode, the property
      always returns AUTO.
    • Ell's avatar
      app: fix CRITICALs in GimpMeasureTool · 7fc5698f
      Ell authored
      In GimpMeasureTool, don't try to access the "straighten" button
      when halting the tool if it's NULL, which can happen when the
      measure tool is selected upon startup, but is changed before its
      tool-options GUI is constructed.
    • Ell's avatar
      app: in gimp_transform_matrix_generic(), apply matrix even if invalid · 59ef222c
      Ell authored
      In gimp_transform_matrix_generic(), apply the resulting matrix even
      if the transformation is invalid, since GimpGenericTransformTool
      relies on the matrix to properly update the transform-grid widget.
    • Ell's avatar
      app: in GimpTransformGridTool, fix layer hiding · 7ed51204
      Ell authored
      In GimpTransformGridTool, when the "show-preview" tool-option
      changes, don't take the transform validity into account when
      deciding whether to hide the current layer -- it should only affect
      the visibility of the preview, not the layer.
    • Ell's avatar
      app: in GimpTransformGridTool, remove flip-tool hack · 3ebda874
      Ell authored
      The flip tool is not a subclass of GimpTransformGridTool; this is
      a leftover from GimpTransformTool.
    • Michael Natterer's avatar
  5. 03 Feb, 2019 1 commit
  6. 02 Feb, 2019 1 commit
    • Michael Natterer's avatar
      Issue #2867 - iso-codes location is not relocatable on all platforms · 10ce7021
      Michael Natterer authored
      gimplanguagestore-parser.c (parse_iso_codes): instead of
      special-casing Windows and OS X, use ENABLE_RELOCATABLE_RESOURCES and
      find the package relative to ${gimp_installation_directory}, so
      relocating it works on all platforms (also flatpack, snap, whatever),
      given the --enable-relocatable-bundle configure switch is used.
  7. 31 Jan, 2019 5 commits
    • Ell's avatar
      app: fix CRITICAL when initializing the perspective-clone tool · 07d2d5af
      Ell authored
      When initializaing the perspective-clone tool in paint mode, the
      GimpDrawTool may already be active, causing the call to
      gimp_draw_tool_start() to fail with a CRITICAL.  Stop the draw tool
      first, if active, to avoid that.
    • Ell's avatar
      app: in perspective-clone tool, fix cursor presicion; hide brush while adjusting · e5c9314a
      Ell authored
      In GimpPerspectiveCloneTool, use PIXEL_CENTER cursor precision
      while setting the source, and place the source-position handle at
      the center of the selected pixel, rather than at its top-left
      Additionally, disable the paint tool while adjusting the
      perspective, so that the brush outline isn't shown, and the cursor
      precision remains SUBPIXEL, even if the hard-edge option is
    • Ell's avatar
      app: add gimp_paint_tool_set_active() · 05dd5029
      Ell authored
      ... which can use to enable/disable certain aspects of
      GimpPaintTool (in particular, brush-outline drawing).  Should be
      used by subclasses, to temporarily disable the paint tool while in
      a non-paint mode (currently, this is only needed by the
      perspective-clone tool; see next commit.)
    • Ell's avatar
      app: fix cursor precision of source tools · ef281823
      Ell authored
      In GimpCloneTool, set the cursor precision to PIXEL_CENTER while
      setting a source, and have GimpBrushTool snap the brush outline to
      pixel centers.
    • Ell's avatar
      app: fix cursor precision of various tools · 158705e4
      Ell authored
      Fix the cursor precision of the cage-transform, foreground-select,
      n-point deformation, and warp-transform tools.
  8. 28 Jan, 2019 2 commits
  9. 27 Jan, 2019 1 commit
  10. 25 Jan, 2019 3 commits
    • Salamandar's avatar
      Undo some (unnecessary) changes. · fc657184
      Salamandar authored
    • Salamandar's avatar
      (source modifs) Fix: Rename macros as it conflicts with Mingw headers. · fc8303dd
      Salamandar authored
      * DATADIR -> SYSDATADIR (tools/)
    • Jehan's avatar
      app: new gimp_spin_scale_set_constrain_drag() and use it on paint... · bff3903f
      Jehan authored
      ... tools' brush options.
      After discussions, it turned out that many people disliked that the spin
      scale for brush size (and some other options) get you fractional values.
      How often do you actually need to get a 4.32 pixel-size brush? And even
      how meaningful is it? On the other hand, you usually want a 4 or a 5
      pixel size brush and it's nearly impossible to get (exactly) by dragging
      the scale widget.
      It is so annoying that some even resort to edit the value with keyboard!
      So I am adding an optional "constrain" feature to GimpSpinScale. It will
      still be possible to get fractional values when constraining is on, for
      instance with keyboard edit (the arrow incrementation also will keep any
      fractional part). So the interaction for such scales is simply reversed
      so that you get integers easily, and fractional parts with a bit more
      It is not turned on by default (some feature actually need precision and
      we don't want to break the sliders for these) and for the time being, I
      only applied it to all the brush settings in paint tools. Now that it
      exist, we may want to apply this to more scales in various parts of
  11. 24 Jan, 2019 2 commits
    • Jehan's avatar
      Issue #2848: some sentences have no translation. · f508e24f
      Jehan authored
    • Ell's avatar
      app: in gimp:gradient, improve adaptive supersampling · 2cd7938f
      Ell authored
      In gimp:gradient, when using adaptive supersampling, render the
      gradient tile-by-tile, using an iterator, instead of row-by-row.
      This significantly improves performance, while also avoiding the
      assumption that gimp_adaptive_supersample_area() works row-by-row.
      Additionally, when not using supersampling, use a single GRand
      instance, since the separation to distinct seed and per-tile
      instances, which was a threading optimization (commit
      7f39e412), is no longer needed.
  12. 23 Jan, 2019 1 commit
    • Jehan's avatar
      app: allow more motion events with line art bucket fill. · 9c13058d
      Jehan authored
      When a fill zone was a bit too segmented, you'd want to just stroke
      across it. But it was leaving some pieces uncolored, even though the
      pointer dragged through it! The exact motion mode allows more events.
      Note: I don't set it in the similar color filling (where it could have
      been useful too) mostly because it is harder to remove events then (even
      if a point was already filled, it could still serve as a seed for more
      filling if threshold > 0), thus implied too much processing. Anyway in
      all my tests, it was more a problem for line art filling anyway.
  13. 21 Jan, 2019 1 commit
    • Ell's avatar
      app: fix rectangle-select tool rounded-corners option · a4726960
      Ell authored
      In GimpToolRectangle, fix the type of the cornder_radius field, so
      that non-integer radii are properly displayed.
      In GimpRectangleSelectOptions and GimpToolRectangle, increase the
      maximal corner radius.
  14. 20 Jan, 2019 1 commit