Commit a29ed35a authored by Christophe Devriese's avatar Christophe Devriese

"fixed" wrong orientation of images

svn path=/trunk/kdegraphics/kpdf/; revision=242835
parent d890a6a3
...@@ -523,7 +523,7 @@ void QOutputDevPixmap::doClip ( GfxState *state, bool winding ) ...@@ -523,7 +523,7 @@ void QOutputDevPixmap::doClip ( GfxState *state, bool winding )
// Then it connects subaths within a single compound polygon to a single // Then it connects subaths within a single compound polygon to a single
// point so that X can fill the polygon (sort of). // point so that X can fill the polygon (sort of).
// //
int QOutputDevPixmap::convertPath ( GfxState *state, QPointArray &points, QMemArray<int> &lengths ) int QOutputDevPixmap::convertPath ( GfxState *state, QPointArray &points, QMemArray<int> &lengths )
{ {
GfxPath *path = state-> getPath ( ); GfxPath *path = state-> getPath ( );
int n = path-> getNumSubpaths ( ); int n = path-> getNumSubpaths ( );
...@@ -849,8 +849,8 @@ void QOutputDevPixmap::drawImage(GfxState *state, Object */*ref*/, Stream *str, ...@@ -849,8 +849,8 @@ void QOutputDevPixmap::drawImage(GfxState *state, Object */*ref*/, Stream *str,
uchar **scanlines = img. jumpTable ( ); uchar **scanlines = img. jumpTable ( );
if ( ctm [3] > 0 ) if ( ctm [3] < 0 )
scanlines += ( height - 1 ); scanlines += ( height - 1 );
for ( int y = 0; y < height; y++ ) { for ( int y = 0; y < height; y++ ) {
QRgb *scanline = (QRgb *) *scanlines; QRgb *scanline = (QRgb *) *scanlines;
...@@ -876,7 +876,7 @@ void QOutputDevPixmap::drawImage(GfxState *state, Object */*ref*/, Stream *str, ...@@ -876,7 +876,7 @@ void QOutputDevPixmap::drawImage(GfxState *state, Object */*ref*/, Stream *str,
ctm [0] < 0 ? scanline-- : scanline++; ctm [0] < 0 ? scanline-- : scanline++;
} }
ctm [3] > 0 ? scanlines-- : scanlines++; ctm [3] > 0 ? scanlines++ : scanlines--;
} }
......
...@@ -105,7 +105,8 @@ namespace KPDF ...@@ -105,7 +105,8 @@ namespace KPDF
void PageWidget::setPage(int page) void PageWidget::setPage(int page)
{ {
static QMutex mutex; static QMutex mutex;
ASSERT(mutex.locked() == false);
mutex.lock(); mutex.lock();
if (m_doc) if (m_doc)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment