Fix for Calligraphy qFatal, Speedup flattening

Richard Theil Richard.Theil at web.de
Tue Apr 14 18:36:57 UTC 2015


Thanks to "Krita for Cats" I got the build running with only minor suffering and had a look. Two patches attached,

#1 fixes the aborting assert I got with calligraphy. Apparently some points fed in are too close, and addCap tries to do some line algebra on a point. Crashes will be avoided if the new cutoff value is low (e.g. near FLT_EPSILON), but that causes ugly spikes to appear. I experimented a bit and settled on the 1.0 which I put in the patch (without any understanding what data is fed into addCap). Someone will have to review that, so I left a TODO. I can hardly believe that no one with a tablet came across that in either Karbon or Krita before.

#2 is the speedup I suggested. Saves a few cycles over the division that was there before, but the routine seems like it's called rather frequently.

Have fun,
Rich

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kkcalli.patch
Type: application/octet-stream
Size: 1009 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20150414/6697481b/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kkflat.patch
Type: application/octet-stream
Size: 865 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20150414/6697481b/attachment-0001.obj>
-------------- next part --------------




More information about the kimageshop mailing list