diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-05-03 18:10:54 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-05-03 18:10:54 +0300 |
commit | c9d81678d7dd7da0ba8d2111f9575d16f00e6a5b (patch) | |
tree | d1dfafd0deace93ae408a61108f77e4372a05dd4 /source | |
parent | 73a76608c8bc20e9eb84a21227324e7502567de1 (diff) | |
parent | 55bf704427e9d6d791fe225a27072c36f23d9eb9 (diff) |
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 3f86e5474c5..bb0a2916d2d 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -1029,9 +1029,15 @@ static void gpencil_invert_image(tGPDfill *tgpf) /* Red->Green */ else if (color[0] == 1.0f) { set_pixel(ibuf, v, fill_col[1]); - /* Add thickness of 2 pixels to avoid too thin lines. */ - int offset = (v % ibuf->x < center) ? 1 : -1; - set_pixel(ibuf, v + offset, fill_col[1]); + /* Add thickness of 2 pixels to avoid too thin lines, but avoid extremes of the pixel line. + */ + int row = v / ibuf->x; + int lowpix = row * ibuf->x; + int highpix = lowpix + ibuf->x - 1; + if ((v > lowpix) && (v < highpix)) { + int offset = (v % ibuf->x < center) ? 1 : -1; + set_pixel(ibuf, v + offset, fill_col[1]); + } } else { /* Set to Transparent. */ |