Skip to content

Strokes on offset layers are offset - fixes issue #8767

programmer_ceds requested to merge programmer_ceds/gimp:OffsetStrokeIssue into master

Relates to GIMP V2_99_13

Issue #8767 (closed) describes the issue and how to reproduce it. If a path or selection is stoked with a paint tool, rather than a line, when an offset layer is selected then the strokes are offset and do not lie over the path or selection boundary. Stroking using a line always seems to draw the line(s) in the correct place. In V2.10.32 there was no difference in the stroke position whether the line or paint tool stroking method was used - they were drawn in the correct places.

The code which causes this problem is unchanged from that of V2.10.32 and has presumably been overlooked when other changes were made (for instance in V2.10.32 if a straight line is painted on a non-offset layer, an offset layer is selected, the mouse moved over the offset layer and shift pressed the starting point of the line is offset - this does not happen in the latest V2.99.13 commit - so there have been changes in this area). The affected functions are gimp_paint_core_stroke_vectors() and gimp_paint_core_stroke_boundary() in app/paint/gimppaintcore-stroke.c. This MR removes the code that adjusts the stroke position by the layer offset - the vector offset or the offset supplied to gimp_paint_core_stroke_boundary() is still applied.

Merge request reports