Precision (Project)

From Scribus Wiki
Revision as of 13:31, 24 September 2012 by Stefan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Working on fixes for text formatting issues I have noticed that area for text (specially overflow area) is calculated with 1 point precision. It is not enough, as 1 point is about 1/3 mm and it creates visible text formatting issues.

All it because in code are used Qt functions and objects with integer precision. I try to switch them to floating precision (QPoint -> QPointF, QPolygon->QPolygonF, QRect->QRectF), but even on my fast QuadCore machine responsibility of Scribus was unacceptable. Text rendering was as slow as I will change my processor to 486. Seems floating precision kill performance very strong.

So - not this way!!!

What we can do is to multiply integer x,y values by some Quality Factor (eg. 100) and use them for calculating text rendering coordinates and divide them by that factor while storing results. It should be as fast as current calculations, but should move imperfection of text rendering below visibility level.