Version: 1.6.3 (using KDE KDE 3.5.7)
Installed from: Slackware Packages
This problem gets clear when you do some very fine pixel work. I used the pixel pencil with 1 pixel in width and height and draw a straight, diagonal line.
When you try this, you will see that there are some (or many) unnecessary pixels.
Since I'm not a native english speaker it is hard for me to explain it with words, so I will show you a picture instead.
That picture is very low in resolution of course.
I compared a line drawn from Krita with one from Gimp.
I drew the line in Gimp directly over the one I drew in Krita so that this is an exact comparison.
Additionally, I made the unnecessary pixels red from the line I made in Krita.
I think the problem is clear.
I filed this as a bug, because it's the first program I found which had this problem. I also don't think that this behaviour is volitional. That wouldn't make any sense to me.
That doesn't look to nice indeed. I'll provisionally assign this bug to Adrian Page because he knows most about our line drawing code. Adrian -- if you think this doesn't belong on your plate, please bounce it back to me.
Yes, the line drawing with thin lines could do with some improvement. Will look into it.
tested with trunk, seems it still needs some improvement, the lines don't look 'right' while using 1 pixel pencil tool, they look bolder, with unneeded pixels i think, I 'll add a screenshot of one example
Created attachment 28228 [details]
the line of the left I did it manually drawing each pixel with the 1px pencil brush, the one of the right with the straight line tool, even though I had the pencil brush set to 1px big, the line of the right looks 2px wide
Adrian Page isn't really active anymore, so reassign to Lukas Tvrdy, our brush engine guru.
This problem is present in all paintops. The problem in KisPaintOp::paintLine. Precise algorithm needs to be implemented for the line.
but for the other paintops it doesn't matter as much -- do you already have an idea about the algorithm needed?
E.g. setup the spray so that the diameter is 1, particle count is 1 and use aliased pixel. Draw line. You get the same behavior.
I need to find out what the other code is actually doing.
So far I notice we interpolate the pressure and tilt through the line and we compute the distance according the spacing. We need to do that properly and here I don't know what to do. If Bresenham's line algorithm would be solution.
Maybe GIMP could help here.
Adrian will be happy to look at it again.
*** Bug 211708 has been marked as a duplicate of this bug. ***
SVN commit 1149758 by langkamp:
add special case to draw one pixel lines if the brush is 1x1 pixel, currently uses wu line which needs to be replace
M +23 -0 kis_penop.cpp
M +3 -0 kis_penop.h
WebSVN link: http://websvn.kde.org/?view=rev&revision=1149758
SVN commit 1150159 by lukast:
DDA line is now fixed. We can use it for line art with Pen brush.
The bug can be closed, but I would leave that for reportee if he is
available and happy ;)
M +1 -1 kis_penop.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1150159