Bye bye QOutputDevPixmap svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=344825remotes/origin/kpdf-experiments
parent
edf38cc6c0
commit
b8c2ee050f
13 changed files with 54 additions and 155 deletions
@ -1,59 +0,0 @@ |
||||
/***************************************************************************
|
||||
* Copyright (C) 2003-2004 by Christophe Devriese * |
||||
* <Christophe.Devriese@student.kuleuven.ac.be> * |
||||
* Copyright (C) 2003 by Helio Chissini de Castro * |
||||
* <helio@conectiva.com.br> * |
||||
* Copyright (C) 2003 by Dirk Mueller <mueller@kde.org> * |
||||
* Copyright (C) 2003 by Scott Wheeler <wheeler@kde.org> * |
||||
* Copyright (C) 2003 by Ingo Klöcker <kloecker@kde.org> * |
||||
* Copyright (C) 2003 by Andy Goossens <andygoossens@telenet.be> * |
||||
* Copyright (C) 2004 by Dominique Devriese <devriese@kde.org> * |
||||
* Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> * |
||||
* * |
||||
* This program is free software; you can redistribute it and/or modify * |
||||
* it under the terms of the GNU General Public License as published by * |
||||
* the Free Software Foundation; either version 2 of the License, or * |
||||
* (at your option) any later version. * |
||||
***************************************************************************/ |
||||
|
||||
#ifdef __GNUC__ |
||||
#pragma implementation |
||||
#endif |
||||
|
||||
#include <GfxState.h> |
||||
|
||||
#include <kdebug.h> |
||||
|
||||
#include "SplashBitmap.h" |
||||
#include "SplashTypes.h" |
||||
|
||||
#include "QOutputDevPixmap.h" |
||||
|
||||
//------------------------------------------------------------------------
|
||||
// QOutputDevPixmap
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
QOutputDevPixmap::QOutputDevPixmap(SplashColor paperColor) : QOutputDev(paperColor), m_image(0) |
||||
{ |
||||
} |
||||
|
||||
QOutputDevPixmap::~QOutputDevPixmap( ) |
||||
{ |
||||
} |
||||
|
||||
void QOutputDevPixmap::endPage ( ) |
||||
{ |
||||
SplashColorPtr dataPtr; |
||||
int bh, bw; |
||||
|
||||
QOutputDev::endPage(); |
||||
bh = getBitmap()->getHeight(); |
||||
bw = getBitmap()->getWidth(); |
||||
dataPtr = getBitmap()->getDataPtr(); |
||||
m_image = QImage((uchar*)dataPtr.rgb8, bw, bh, 32, 0, 0, QImage::IgnoreEndian); |
||||
} |
||||
|
||||
const QImage &QOutputDevPixmap::getImage() const |
||||
{ |
||||
return m_image; |
||||
} |
||||
@ -1,44 +0,0 @@ |
||||
/***************************************************************************
|
||||
* Copyright (C) 2003-2004 by Christophe Devriese * |
||||
* <Christophe.Devriese@student.kuleuven.ac.be> * |
||||
* Copyright (C) 2003 by Laurent Montel <montel@kde.org> * |
||||
* Copyright (C) 2003 by Helio Chissini de Castro * |
||||
* <helio@conectiva.com.br> * |
||||
* Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es> * |
||||
* * |
||||
* This program is free software; you can redistribute it and/or modify * |
||||
* it under the terms of the GNU General Public License as published by * |
||||
* the Free Software Foundation; either version 2 of the License, or * |
||||
* (at your option) any later version. * |
||||
***************************************************************************/ |
||||
|
||||
#ifndef QOUTPUTDEVPIXMAP_H |
||||
#define QOUTPUTDEVPIXMAP_H |
||||
|
||||
#ifdef __GNUC__ |
||||
#pragma interface |
||||
#endif |
||||
|
||||
#include "QOutputDev.h" |
||||
|
||||
#include <qimage.h> |
||||
|
||||
class QOutputDevPixmap : public QOutputDev { |
||||
public: |
||||
|
||||
// Constructor.
|
||||
QOutputDevPixmap(SplashColor paperColor); |
||||
|
||||
// Destructor.
|
||||
virtual ~QOutputDevPixmap(); |
||||
|
||||
// End a page
|
||||
virtual void endPage(); |
||||
|
||||
const QImage &getImage() const; |
||||
|
||||
private: |
||||
QImage m_image; |
||||
}; |
||||
|
||||
#endif // QOUTPUTDEVPIXMAP
|
||||
Loading…
Reference in new issue