[poppler] Scaling factor and placement accuracy
Albert Astals Cid
aacid at kde.org
Sun Mar 26 16:19:30 UTC 2017
El dijous, 23 de març de 2017, a les 14:58:24 CEST, pqt at LEFerguson.com va
escriure:
> I am attaching an example.
>
> I tried to get it to just one note without success, it appears to matter
> where these appear on the page horizontally not just vertically, so I just
> experimented with a very few notes until I got a size that worked. The
> issue is in the third measure on the bottom staff and the second note.
> That note should be bisected by the line, instead it is significantly too
> high, ambiguous with being between lines (i.e. it is an F, it looks like a
> G if you read music).
>
> The JPG shows how I see it. Viewed in Adobe it is correct.
>
> The relevant code that produces it is this:
>
> Poppler::Page* tmpPage = ((PDFDocument*)ourParent)->document->page(mPage -
> 1); QSizeF thisPageSize = tmpPage->pageSizeF(); // in 72's of inch
> double scaleX = (double)mWidth / ((double)thisPageSize.width() /
> (double)72.0); double scaleY = (double)mHeight /
> ((double)thisPageSize.height() / (double)72.0); double desiredScale =
> std::min(scaleX, scaleY);
> ourParent->document->setRenderHint(Poppler::Document::Antialiasing);
> ourParent->document->setRenderHint(Poppler::Document::TextAntialiasing);
> ourParent->document->setRenderHint(Poppler::Document::ThinLineSolid);
Tried thin line shape instaead of thing line solid?
Cheers,
Albert
More information about the poppler
mailing list