kpresenter
KPrShadowObject Class Reference
#include <KPrObject.h>
Inherits KPrObject.
Inherited by KPr2DObject, KPrLineObject, and KPrPointObject.
Detailed Description
Base class for objects with a pen and a brush, and which takes care of painting the shadow in draw() (by calling paint() twice).Definition at line 406 of file KPrObject.h.
Public Member Functions | |
KPrShadowObject (const KoPen &_pen) | |
KPrShadowObject & | operator= (const KPrShadowObject &) |
virtual void | setPen (const KoPen &_pen) |
virtual KoPen | getPen () const |
virtual QDomDocumentFragment | save (QDomDocument &doc, double offset) |
virtual double | load (const QDomElement &element) |
virtual void | loadOasis (const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info) |
virtual void | draw (QPainter *_painter, KoTextZoomHandler *_zoomHandler, int pageNum, SelectionMode selectionMode, bool drawContour=FALSE) |
virtual void | saveOasisStrokeElement (KoGenStyles &mainStyles, KoGenStyle &styleobjectauto) const |
QString | saveOasisStrokeStyle (KoGenStyles &mainStyles) const |
Protected Member Functions | |
bool | loadOasisDrawPoints (KoPointArray &points, const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info) |
bool | loadOasisApplyViewBox (const QDomElement &element, KoPointArray &points) |
virtual void | fillStyle (KoGenStyle &styleObjectAuto, KoGenStyles &mainStyles) const |
virtual KoPen | defaultPen () const |
virtual void | paint (QPainter *, KoTextZoomHandler *, int, bool drawingShadow, bool=FALSE) |
Static Protected Member Functions | |
static bool | saveOasisDrawPoints (const KoPointArray &points, KPOasisSaveContext &sc) |
Protected Attributes | |
KoPen | pen |
Member Function Documentation
bool KPrShadowObject::saveOasisDrawPoints | ( | const KoPointArray & | points, | |
KPOasisSaveContext & | sc | |||
) | [static, protected] |
Helper method for saving draw:points.
The svg:viewBox is also saved.
Definition at line 1733 of file KPrObject.cpp.
bool KPrShadowObject::loadOasisDrawPoints | ( | KoPointArray & | points, | |
const QDomElement & | element, | |||
KoOasisContext & | context, | |||
KPrLoadingInfo * | info | |||
) | [protected] |
Helper method for loading draw:points.
The svg:viewBox is taken into account.
Definition at line 1757 of file KPrObject.cpp.
bool KPrShadowObject::loadOasisApplyViewBox | ( | const QDomElement & | element, | |
KoPointArray & | points | |||
) | [protected] |
Apply the svg:viewBox attribute to the points.
This calculates the points of the object. It uses the size of the object and the viewBox attribute to calculate the object points. When no svg:viewBox is specified it is calculated form the supplied points.
- Parameters:
-
element the xml element from which the viewBox attribute should be read. points which should be updated.
Definition at line 1774 of file KPrObject.cpp.
KoPen KPrShadowObject::defaultPen | ( | ) | const [protected, virtual] |
save() only saves if the pen is different from the default pen.
The default pen can vary depending on the subclass of KPrShadowObject (e.g. it's a black solidline for lines and rects, but it's NoPen for text objects
Definition at line 1962 of file KPrObject.cpp.
void KPrShadowObject::paint | ( | QPainter * | painter, | |
KoTextZoomHandler * | zoomHandler, | |||
int | pageNum, | |||
bool | drawingShadow, | |||
bool | drawContour = FALSE | |||
) | [protected, virtual] |
This method is to be implemented by all KPShadowObjects, to draw themselves.
draw() took care of the shadow and of preparing painter
for rotation. paint() must take care of the gradient itself!
- Parameters:
-
drawingShadow true if called to draw the shadow of the object. Usually objects will want to draw a simpler version of themselves in that case.
Definition at line 1967 of file KPrObject.cpp.
The documentation for this class was generated from the following files: