Commit b3527471 authored by Hanzes Matus's avatar Hanzes Matus

Added support for shape in background in kword

parent bce3d694
......@@ -92,6 +92,7 @@ KoShapePrivate::KoShapePrivate(KoShape *shape)
filterEffectStack(0),
transparency(0.0),
zIndex(0),
runThrough(0),
visible(true),
printable(true),
geometryProtected(false),
......@@ -442,6 +443,13 @@ QTransform KoShape::transformation() const
bool KoShape::compareShapeZIndex(KoShape *s1, KoShape *s2)
{
if(s1->runThrough() > s2->runThrough()) {
return false;
}
if(s1->runThrough() < s2->runThrough()) {
return true;
}
bool foundCommonParent = false;
KoShape *parentShapeS1 = s1;
KoShape *parentShapeS2 = s2;
......@@ -780,6 +788,18 @@ void KoShape::setZIndex(int zIndex)
d->zIndex = zIndex;
}
int KoShape::runThrough()
{
Q_D(const KoShape);
return d->runThrough;
}
void KoShape::setRunThrough(short int runThrough)
{
Q_D(KoShape);
d->runThrough = runThrough;
}
void KoShape::setVisible(bool on)
{
Q_D(KoShape);
......
......@@ -384,6 +384,20 @@ public:
*/
void setZIndex(int zIndex);
/**
* Retrieve the run through property of this shape.
* The run through property is used to determine if the shape is behind, inside or before text.
* @return the run through of this shape.
*/
int runThrough();
/**
* Set the run through property of this shape.
* The run through property is used to determine if the shape is behind, inside or before text.
* @param runThrough the new run through;
*/
void setRunThrough(short int runThrough);
/**
* Changes the Shape to be visible or invisible.
* Being visible means being painted, as well as being used for
......
......@@ -109,6 +109,7 @@ public:
static const int MaxZIndex = 32767;
int zIndex : 16; // keep maxZIndex in sync!
int runThrough : 16;
int visible : 1;
int printable : 1;
int geometryProtected : 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment