lib
KoPictureImage Class Reference
Inheritance diagram for KoPictureImage:

Detailed Description
Definition at line 34 of file KoPictureImage.h.
Public Member Functions | |
| KoPictureImage () | |
| virtual | ~KoPictureImage () |
| 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) |
| virtual QDragObject * | dragObject (QWidget *dragSource=0L, const char *name=0L) |
| 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 bool | hasAlphaBuffer () const |
| virtual void | setAlphaBuffer (bool enable) |
| virtual QImage | createAlphaMask (int conversion_flags=0) const |
| virtual void | clearCache (void) |
Protected Member Functions | |
| QPixmap | getPixmap (QImage &image) |
| void | scaleAndCreatePixmap (const QSize &size, bool fastMode=false) |
Constructor & Destructor Documentation
| KoPictureImage::KoPictureImage | ( | ) |
| KoPictureImage::~KoPictureImage | ( | ) | [virtual] |
Member Function Documentation
| bool KoPictureImage::isNull | ( | void | ) | const [virtual] |
Returns true if the picture is null.
Reimplemented from KoPictureBase.
Definition at line 54 of file KoPictureImage.cpp.
| void KoPictureImage::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.
Reimplemented from KoPictureBase.
Definition at line 92 of file KoPictureImage.cpp.
| QDragObject * KoPictureImage::dragObject | ( | QWidget * | dragSource = 0L, |
|
| const char * | name = 0L | |||
| ) | [virtual] |
Create a dragobject containing this picture.
- Parameters:
-
dragSource must be 0 when copying to the clipboard
- Returns:
- 0L if the picture is null!
Reimplemented from KoPictureBase.
Definition at line 178 of file KoPictureImage.cpp.
| bool KoPictureImage::save | ( | QIODevice * | io | ) | const [virtual] |
save file
- Parameters:
-
io QIODevice used for saving
Reimplemented from KoPictureBase.
Definition at line 148 of file KoPictureImage.cpp.
| QImage KoPictureImage::generateImage | ( | const QSize & | size | ) | [virtual] |
Generate a QImage (always in slow mode).
Reimplemented from KoPictureBase.
Definition at line 183 of file KoPictureImage.cpp.
The documentation for this class was generated from the following files:

