Bug 317556 - Sketch brush strokes are tinted blue at the beginning of each stroke, regardless of color used, paint connection line toggles it on and off.
Summary: Sketch brush strokes are tinted blue at the beginning of each stroke, regardl...
Status: RESOLVED DUPLICATE of bug 316858
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: http://s14.postimg.org/gim3lmm8v/blue...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-29 17:45 UTC by Sascha S.
Modified: 2013-04-06 12:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha S. 2013-03-29 17:45:10 UTC
Simply using the sketch brush engine produces the result for me, both in OpenGL mode and without it.
The effect is particularly visible if I just dab the brush using a digitizer at low to medium pressure, producing blue splotches. Mouse does it, too, but they're harder to spot since they quickly get overwritten with the actual color. The blue tinting only happens at very beginning of a stroke, especially with a little amount of motion. Just pressing the stylus down seems to either hide the splotches or does not trigger them. Messing around with color profiles did not do anything for me.

Reproducible: Always

Steps to Reproduce:
1.Choose any sketch brush preset or customize any brush to make it use the sketch brush engine.
2.Make dabbing strokes or light sweeping/smudging motions.
3.Enjoy blue splotches of varying opacity/saturation.
Actual Results:  
Blue pigmentation at the start of blue strokes. 

Expected Results:  
Not tint the brush stroke blue.
Comment 1 Sascha S. 2013-03-30 11:05:32 UTC
(In reply to comment #0)

I just found out that, in Brush Settings->Brush Size, un-checking the ``paint connection line'' option removes the blue splotches and checking it produces it again. Also, I would gauge the age of this bug at about 3 days or so. Checking the git log does not provide any clues to me. There were some color related commits but no explicit mentioning of the sketch brush or its options.
Comment 2 Halla Rempt 2013-03-30 12:06:02 UTC
Hi,

Thanks for your report. I can reproduce the issue, though it takes a bit of time, it's most apparent with small strokes from top-right to bottom-left.
Comment 3 Sascha S. 2013-03-30 12:35:08 UTC
Hi,

No problem.
I've poked around a bit and it might be located in the `KisPainter::drawLine' method.
`KisPainter::DrawThickLine' in the `KisSketchPaintOp::drawConnection' method did not seem to get called, even with a lineWidth of 1.0. 
(I did not explicitly debug, though, merely used a 1.0 sized brush and added some printfs to see what was called.)

Hope that helps.
Cheers, and thank you for working on this amazing piece of software!
Comment 4 Halla Rempt 2013-03-30 12:42:05 UTC
Ah... That's itneresting, since that code got changed recently by Dmitry.
Comment 5 Sascha S. 2013-03-30 17:03:06 UTC
`KisPainter::setPaintColor(const KoColor& color)'
Changing  `d->paintColor = color;' to  `d->paintColor = KoColor();' produces the blue color for all brushes.

`KisPainter::drawLine' grabs that color at line 1379  `KoColor mycolor = d->paintColor' so I'm guessing that there is some initialization going wrong. I'm not experienced enough with the toolchain/whatever methods are used to trace these things. I'm rather new to GNU/Linux in general.
Comment 6 Halla Rempt 2013-03-30 17:11:41 UTC
You're still doing a good job of hunting things down :-)
Comment 7 Sascha S. 2013-03-30 17:26:10 UTC
Thank you :-) 
It's not super hard, since I'm more or less sufficiently versed in C++, but it would be a lot faster/productive if I sat down and get friendly with gdb and co, which I've not yet done, but will. 
Krita didn't take long to make me love it and the recent changes in the Vector department have me psyched even more, and while I'm not ready, yet,I'm at least motivating myself with the goal of perhaps contributing something back to the project.

But I digress and don't wanna abuse the bug tracker like this. If I do make another post then it will be a working patch for this or bust :P

Cheers!
Comment 8 Halla Rempt 2013-03-30 18:49:14 UTC
That would be awesome!

On Sat, 30 Mar 2013, M8R-nvuxt11@mailinator.com wrote:

> https://bugs.kde.org/show_bug.cgi?id=317556
>
> --- Comment #7 from M8R-nvuxt11@mailinator.com ---
> Thank you :-)
> It's not super hard, since I'm more or less sufficiently versed in C++, but it
> would be a lot faster/productive if I sat down and get friendly with gdb and
> co, which I've not yet done, but will.
> Krita didn't take long to make me love it and the recent changes in the Vector
> department have me psyched even more, and while I'm not ready, yet,I'm at least
> motivating myself with the goal of perhaps contributing something back to the
> project.
>
> But I digress and don't wanna abuse the bug tracker like this. If I do make
> another post then it will be a working patch for this or bust :P
>
> Cheers!
>
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are watching the assignee of the bug.
>
Comment 9 Sascha S. 2013-03-31 14:14:48 UTC
Well, I think I'm going for a bust here. The farthest I've come was realizing that the sketch brush is generating a lot of `KisPainter' instances when connection lines are drawn. With many calls to `KisPainter::setPaintColor', before settling on one stable memory location of a `KisPainter' for `KisSketchPaintOP::m_painter'.

I fail to trace the creation of these instances and figure out why on the first (few) seem to be badly initialized. So don't wait for me here =P.

Anyway, thanks again for your time.
Cheers!
Comment 10 Halla Rempt 2013-04-06 12:31:28 UTC

*** This bug has been marked as a duplicate of bug 316858 ***