[poppler] [PATCH] Arthur backend fixes; poppler-qt4 direct rendering
Pino Toscano
pino at kde.org
Fri Nov 5 17:08:51 PDT 2010
Hi,
Alle lunedì 1 novembre 2010, Matthias Fauconneau ha scritto:
> The first patch contains two easy fixes for Arthur :
> - font rendering (transforming the glyph path and not only the glyph
> origin).
> - image rendering (alpha was set to zero).
- try to avoid mixing indentation and actual code changes, they make
reviewing the changes a bit difficult
- using QImage::scanLine() can be not that fast, especially if called
repeately. much better if you iterate "by row" manually yourself of the
image buffer
- in the past I had issues with Format_RGB32 and the alpha pixels not
being totally opaque (ie 0xff): you can just use ARGB32 for both the
cases (creating the QImage out of the if(), and on stack) and reset to
0xff the alpha values
> The second patch expose the QPainter interface directly through a
> renderToPainter method which use an existing painter instead of
> creating an image.
I'm not sure to like the implementation of basically making (again) a
rendering method specific to a backend, with a generic method...
Anyway, for renderToPainter:
- it should check for the painter pointer (if 0)
- it should have a parameter of a flag type for options for the "painter
way" rendering
- it should by default save+restore the painter, to avoid messying a
caller-owned painter; the flag parameter proposed above should have an
enum saying to avoid this save/restore job (similar to QGraphicsItem);
renderToImag should use this enum value, of course
- "renderToPainter(&painter,xres,yres,x,y,w,h,rotate);"
please add spaces after commas
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20101106/eb2cee6d/attachment.pgp>
More information about the poppler
mailing list