Precision (Project)

From Scribus Wiki
Revision as of 08:19, 6 September 2011 by Cezaryece (talk | contribs) (Created page with "Working on fixes for text formatting issues I have notice that area for text (specially overflow area) is calculated with 1 point precision. It is not enough, as 1 point is about...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Working on fixes for text formatting issues I have notice 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 makes 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.