#include <KoPictureEps.h>
Graphe d'héritage de KoPictureEps:
Fonctions membres publiques | |
| KoPictureEps () | |
| virtual | ~KoPictureEps () |
| KoPictureType::Type | getType (void) const |
| KoPictureBase * | newCopy (void) const |
| virtual bool | isNull (void) const |
| virtual void | draw (QPainter &painter, int x, int y, int width, int height, int sx=0, int sy=0, int sw=-1, int sh=-1, bool fastMode=false) |
| Draw the image in a painter. | |
| virtual bool | loadData (const QByteArray &array, const QString &extension) |
| virtual bool | save (QIODevice *io) const |
| virtual QSize | getOriginalSize (void) const |
| virtual QPixmap | generatePixmap (const QSize &size, bool smoothScale=false) |
| virtual QString | getMimeType (const QString &extension) const |
| virtual QImage | generateImage (const QSize &size) |
| virtual void | clearCache (void) |
Fonctions membres protégées | |
| QPixmap | getPixmap (QImage &image) |
| void | scaleAndCreatePixmap (const QSize &size, bool fastMode, const int resolutionx, const int resolutiony) |
| QImage | scaleWithGhostScript (const QSize &size, const int resolutionx, const int resolutiony) |
| bool | extractPostScriptStream (void) |
Fonctions membres privées | |
| int | tryScaleWithGhostScript (QImage &image, const QSize &size, const int resolutionx, const int resolutiony, const char *device) |
| QString | readLine (const QByteArray &array, const uint start, const uint length, uint &pos, bool &lastCharWasCr) |
| Read a line from a PostScript stream in a QByteArray. | |
Attributs privés | |
| QByteArray | m_rawData |
| QPixmap | m_cachedPixmap |
| Cached pixmap. | |
| QSize | m_originalSize |
| Original size of the EPS picture. | |
| QSize | m_cachedSize |
| size of the currently cached pixmap | |
| QRect | m_boundingBox |
| Bounding box, as read from the EPS file. | |
| uint | m_psStreamStart |
| Start position of the PostScript stream (like if it was a MS-DOS EPS file). | |
| uint | m_psStreamLength |
| Length of the PostScript stream (like if it was a MS-DOS EPS file). | |
| bool | m_cacheIsInFastMode |
Définition à la ligne 37 du fichier KoPictureEps.h.
| KoPictureEps::KoPictureEps | ( | ) |
Default constructor.
Définition à la ligne 47 du fichier KoPictureEps.cpp.
Référencé par newCopy().
Voici le graphe d'appel pour cette fonction :
| KoPictureEps::~KoPictureEps | ( | ) | [virtual] |
Destructor.
Définition à la ligne 51 du fichier KoPictureEps.cpp.
| KoPictureType::Type KoPictureEps::getType | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 60 du fichier KoPictureEps.cpp.
Références KoPictureType::TypeEps.
| KoPictureBase * KoPictureEps::newCopy | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 55 du fichier KoPictureEps.cpp.
Références KoPictureEps().
Voici le graphe d'appel pour cette fonction :
| bool KoPictureEps::isNull | ( | void | ) | const [virtual] |
Returns true if the picture is null.
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 65 du fichier KoPictureEps.cpp.
Références m_rawData.
| void KoPictureEps::draw | ( | QPainter & | painter, | |
| int | x, | |||
| int | y, | |||
| int | width, | |||
| int | height, | |||
| int | sx = 0, |
|||
| int | sy = 0, |
|||
| int | sw = -1, |
|||
| int | sh = -1, |
|||
| bool | fastMode = false | |||
| ) | [virtual] |
Draw the image in a painter.
No, this isn't as simple as painter.drawPixmap(). This method ensures that the best quality is used when printing, scaling the painter.
The parameter fastMode allows the picture to be re-sized and drawn quicker if possible
The parameters width, height define the desired size for the image Note that the image is being scaled to that size using scale() - except when printing. This avoids scaling the image at each paint event.
The other parameters are very similar to QPainter::drawPixmap : (x, y) define the position in the painter, (sx, sy) specify the top-left point in pixmap that is to be drawn. The default is (0, 0). (sw, sh) specify the size of the pixmap that is to be drawn. The default, (-1, -1), means all the way to the bottom right of the pixmap.
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 230 du fichier KoPictureEps.cpp.
Références m_cachedPixmap, scaleAndCreatePixmap(), et scaleWithGhostScript().
Voici le graphe d'appel pour cette fonction :
| bool KoPictureEps::loadData | ( | const QByteArray & | array, | |
| const QString & | extension | |||
| ) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 327 du fichier KoPictureEps.cpp.
Références extractPostScriptStream(), m_boundingBox, m_originalSize, m_psStreamLength, m_psStreamStart, m_rawData, gensymbolfontmap::pos, et readLine().
Voici le graphe d'appel pour cette fonction :
| bool KoPictureEps::save | ( | QIODevice * | io | ) | const [virtual] |
save file
| io | QIODevice used for saving |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 407 du fichier KoPictureEps.cpp.
Références m_rawData, et testguiform::size.
| QSize KoPictureEps::getOriginalSize | ( | void | ) | const [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 414 du fichier KoPictureEps.cpp.
Références m_originalSize.
| QPixmap KoPictureEps::generatePixmap | ( | const QSize & | size, | |
| bool | smoothScale = false | |||
| ) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 419 du fichier KoPictureEps.cpp.
Références m_cachedPixmap, et scaleAndCreatePixmap().
Voici le graphe d'appel pour cette fonction :
| QString KoPictureEps::getMimeType | ( | const QString & | extension | ) | const [virtual] |
| QImage KoPictureEps::generateImage | ( | const QSize & | size | ) | [virtual] |
Generate a QImage (always in slow mode)
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 430 du fichier KoPictureEps.cpp.
Références scaleWithGhostScript().
Voici le graphe d'appel pour cette fonction :
| void KoPictureEps::clearCache | ( | void | ) | [virtual] |
Réimplémentée à partir de KoPictureBase.
Définition à la ligne 436 du fichier KoPictureEps.cpp.
Références m_cachedPixmap, m_cachedSize, et m_cacheIsInFastMode.
| QPixmap KoPictureEps::getPixmap | ( | QImage & | image | ) | [protected] |
| void KoPictureEps::scaleAndCreatePixmap | ( | const QSize & | size, | |
| bool | fastMode, | |||
| const int | resolutionx, | |||
| const int | resolutiony | |||
| ) | [protected] |
Définition à la ligne 182 du fichier KoPictureEps.cpp.
Références KoPictureBase::isSlowResizeModeAllowed(), m_cachedPixmap, m_cachedSize, m_cacheIsInFastMode, et scaleWithGhostScript().
Référencé par draw(), et generatePixmap().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
| QImage KoPictureEps::scaleWithGhostScript | ( | const QSize & | size, | |
| const int | resolutionx, | |||
| const int | resolutiony | |||
| ) | [protected] |
Définition à la ligne 70 du fichier KoPictureEps.cpp.
Références m_boundingBox, et tryScaleWithGhostScript().
Référencé par draw(), generateImage(), et scaleAndCreatePixmap().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
| bool KoPictureEps::extractPostScriptStream | ( | void | ) | [protected] |
Définition à la ligne 260 du fichier KoPictureEps.cpp.
Références m_psStreamLength, m_psStreamStart, et m_rawData.
Référencé par loadData().
Voici le graphe d'appel pour cette fonction :
| int KoPictureEps::tryScaleWithGhostScript | ( | QImage & | image, | |
| const QSize & | size, | |||
| const int | resolutionx, | |||
| const int | resolutiony, | |||
| const char * | device | |||
| ) | [private] |
Définition à la ligne 102 du fichier KoPictureEps.cpp.
Références m_boundingBox, m_psStreamLength, m_psStreamStart, et m_rawData.
Référencé par scaleWithGhostScript().
Voici le graphe d'appel pour cette fonction :
| QString KoPictureEps::readLine | ( | const QByteArray & | array, | |
| const uint | start, | |||
| const uint | length, | |||
| uint & | pos, | |||
| bool & | lastCharWasCr | |||
| ) | [private] |
Read a line from a PostScript stream in a QByteArray.
The PostScript stream is somewhere in the QByteArray and therefore has to be determined by the start and length of this stream and the current position
| array | the array which is read | |
| start | start position of the PostScript stream | |
| length | length of the PostScript stream | |
| pos | current position (which is also returned) | |
| lastCharWasCr | defines if the previous line ended with a Carriage Return, to skip an eventual Line Feed at the start of this line |
Définition à la ligne 284 du fichier KoPictureEps.cpp.
Référencé par loadData().
Voici le graphe d'appel pour cette fonction :
QByteArray KoPictureEps::m_rawData [private] |
Copy of the loaded EPS file
Définition à la ligne 124 du fichier KoPictureEps.h.
Référencé par extractPostScriptStream(), isNull(), loadData(), save(), et tryScaleWithGhostScript().
QPixmap KoPictureEps::m_cachedPixmap [private] |
Cached pixmap.
Définition à la ligne 125 du fichier KoPictureEps.h.
Référencé par clearCache(), draw(), generatePixmap(), et scaleAndCreatePixmap().
QSize KoPictureEps::m_originalSize [private] |
Original size of the EPS picture.
Définition à la ligne 126 du fichier KoPictureEps.h.
Référencé par getOriginalSize(), et loadData().
QSize KoPictureEps::m_cachedSize [private] |
size of the currently cached pixmap
Définition à la ligne 127 du fichier KoPictureEps.h.
Référencé par clearCache(), et scaleAndCreatePixmap().
QRect KoPictureEps::m_boundingBox [private] |
Bounding box, as read from the EPS file.
Définition à la ligne 128 du fichier KoPictureEps.h.
Référencé par loadData(), scaleWithGhostScript(), et tryScaleWithGhostScript().
uint KoPictureEps::m_psStreamStart [private] |
Start position of the PostScript stream (like if it was a MS-DOS EPS file).
Définition à la ligne 129 du fichier KoPictureEps.h.
Référencé par extractPostScriptStream(), loadData(), et tryScaleWithGhostScript().
uint KoPictureEps::m_psStreamLength [private] |
Length of the PostScript stream (like if it was a MS-DOS EPS file).
Définition à la ligne 130 du fichier KoPictureEps.h.
Référencé par extractPostScriptStream(), loadData(), et tryScaleWithGhostScript().
bool KoPictureEps::m_cacheIsInFastMode [private] |
true, if the last cached image was done using fast mode. false, if the last cached image was done using slow mode.
Définition à la ligne 135 du fichier KoPictureEps.h.
Référencé par clearCache(), et scaleAndCreatePixmap().
1.5.1-p1