Search for usage in LXR

#include <image.h>

Inheritance diagram for khtmlImLoad::Image:

Public Member Functions

 Image (ImageOwner *owner)
 ~Image ()
bool complete () const
bool hasAlpha () const
bool processData (uchar *data, int length)
void processEOF ()
QImageqimage () const
void setShowAnimations (KHTMLSettings::KAnimationAdvice)
QSize size () const

Protected Member Functions

void loadError ()
void notifyFrameChange ()
void notifyPerformUpdate ()
void noUpdates ()
void requestUpdate (int line)

Protected Attributes

KHTMLSettings::KAnimationAdvice animationAdvice
QByteArray bufferPreDetect
bool fullyDecoded
unsigned int height
bool inError
unsigned int loaderScanline
QMap< QPair< int, int >, PixmapPlane * > scaled
int updatesEndLine
bool updatesPending
int updatesStartLine
unsigned int width

Detailed Description

An image represents a static picture or an animation, that may be incrementally loaded.

Definition at line 51 of file image.h.

Constructor & Destructor Documentation

khtmlImLoad::Image::Image ( ImageOwner owner)

Creates an image with a given owner; the owner will be notified about the repaint event, the image geometry, and so on; and also if the image can not be decoded.

The image must be fed data through the processData() call; and it will take care of the rest automatically.

Definition at line 40 of file image.cpp.

khtmlImLoad::Image::~Image ( )

Cleans up.

Definition at line 57 of file image.cpp.

Member Function Documentation

bool khtmlImLoad::Image::complete ( ) const

Returns true if the image has been fully loaded.

Definition at line 358 of file image.cpp.

bool khtmlImLoad::Image::hasAlpha ( ) const

Returns true if the image may have an alpha channel.

Definition at line 476 of file image.cpp.

void khtmlImLoad::Image::notifyFrameChange ( )

Called when animation frame changes, requesting the owner to repaint.

Definition at line 89 of file image.cpp.

void khtmlImLoad::Image::notifyPerformUpdate ( )

Called by the updater when the image should tell its owners about new changes.

Definition at line 82 of file image.cpp.

bool khtmlImLoad::Image::processData ( uchar *  data,
int  length 

Provides new data for decoding.

The method will return false if there is no longer any use to feeding it more data (i.e. if the image is complete, or broken, etc.); however, it is safe to do so.

Definition at line 104 of file image.cpp.

void khtmlImLoad::Image::processEOF ( )

Notifies the image that the data source is exhausted, in case it cares.

This should be called at the end of the data stream in order for non-incremental decoders to work

Definition at line 187 of file image.cpp.

QImage * khtmlImLoad::Image::qimage ( ) const

Returns the image of basic content.

Should be treated as READ ONLY. (but see CanvasImage)

Definition at line 467 of file image.cpp.

void khtmlImLoad::Image::setShowAnimations ( KHTMLSettings::KAnimationAdvice  newAdvice)

Enables or disables animations.

Definition at line 484 of file image.cpp.

QSize khtmlImLoad::Image::size ( ) const

Returns the image's size.

Definition at line 353 of file image.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Mar 2 2021 23:43:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.