[poppler] [PATCH] Arthur backend fixes; poppler-qt4 direct rendering
pino at kde.org
Fri Nov 5 17:08:51 PDT 2010
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
> - 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
- 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
- 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
please add spaces after commas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the poppler