Bug 297595 - Curve editor does not use an optimal rasterisation algorithm; it produces extra pixels
Summary: Curve editor does not use an optimal rasterisation algorithm; it produces ext...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 2.4-snapshots
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-06 13:47 UTC by Antoine
Modified: 2012-04-19 07:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A tetris piece in the curve after the rasterization step (3.83 KB, application/octet-stream)
2012-04-06 13:47 UTC, Antoine
Details
Pixels are wiggling aroind the curve (4.92 KB, image/png)
2012-04-06 14:03 UTC, Antoine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine 2012-04-06 13:47:59 UTC
Created attachment 70190 [details]
A tetris piece in the curve after the rasterization step

See attachement: This kind  of blob ( Tetris piece, or rookwise connected) should not happen.
Comment 1 Halla Rempt 2012-04-06 13:51:43 UTC
You can enable anti-aliasing for curves in the settings panel. It's a setting because some users didn't want the lines anti-aliased. We don't paint these lines ourselves, that's QPainter's work, so there's nothing much we can do about the aliased case.

Sorry, I'm going to have to close this one -- though there's certainly a case to be made for making AA the default, instead of aliased.
Comment 2 Halla Rempt 2012-04-06 13:53:51 UTC
Git commit dc97f77a474f609f80430e1a5d169fdc8c4b86af by Boudewijn Rempt.
Committed on 06/04/2012 at 15:53.
Pushed by rempt into branch 'master'.

Anti-alias the curves by default

Because it looks prettier :-)

M  +1    -1    krita/ui/kis_config.cc

http://commits.kde.org/calligra/dc97f77a474f609f80430e1a5d169fdc8c4b86af
Comment 3 Antoine 2012-04-06 14:03:27 UTC
Created attachment 70191 [details]
Pixels are wiggling aroind the curve
Comment 4 Antoine 2012-04-06 14:06:57 UTC
The anti-aliased curve does not look good either. I have never noticed this with QPainter's curve drawing algorithm. Something must happen after its job is done.
Comment 5 Halla Rempt 2012-04-06 14:10:31 UTC
hm, you're right. Weird stuff is happening here.
Comment 6 Halla Rempt 2012-04-06 14:14:09 UTC
Git commit b044df223dbcb801472d150bec8c070f10cc6216 by Boudewijn Rempt.
Committed on 06/04/2012 at 16:13.
Pushed by rempt into branch 'master'.

Let Qt draw the polyline

We used to draw lines ourselves, giving a bad result.

M  +5    -8    krita/ui/widgets/kis_curve_widget.cpp

http://commits.kde.org/calligra/b044df223dbcb801472d150bec8c070f10cc6216
Comment 7 Halla Rempt 2012-04-06 14:14:21 UTC
Can you check whether this is better for you?
Comment 8 LukasT 2012-04-09 19:44:09 UTC
I remember Dmitry made it aliased due to precision by default. It is precision vs look-good decision here, we change the defaults back-and-forth.
Comment 9 Halla Rempt 2012-04-09 19:53:07 UTC
I know... but this time I did something more: I also changed the painting algorithm and used QPainter to paint the path directly, instead of us painting line segment by line segment.