Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeFillWrapper.cpp File Reference
#include "KoShapeFillWrapper.h"
#include <KoShape.h>
#include <QList>
#include <QBrush>
#include <KoColorBackground.h>
#include <KoGradientBackground.h>
#include <KoPatternBackground.h>
#include <KoMeshGradientBackground.h>
#include <KoShapeStroke.h>
#include <KoShapeBackgroundCommand.h>
#include <KoShapeStrokeCommand.h>
#include <KoStopGradient.h>
#include "kis_assert.h"
#include "kis_debug.h"
#include "kis_global.h"
#include <KoFlakeUtils.h>

Go to the source code of this file.

Classes

struct  KoShapeFillWrapper::Private
 
struct  ShapeBackgroundFetchPolicy
 
struct  ShapeStrokeFillFetchPolicy
 

Functions

template<class Policy >
bool compareBackgrounds (const QList< KoShape * > shapes)
 

Function Documentation

◆ compareBackgrounds()

template<class Policy >
bool compareBackgrounds ( const QList< KoShape * > shapes)

Definition at line 140 of file KoShapeFillWrapper.cpp.

141{
142 if (shapes.size() == 1) return true;
143
144 typename Policy::PointerType bg =
145 Policy::getBackground(shapes.first());
146
147 Q_FOREACH (KoShape *shape, shapes) {
148 if (
149 !(
150 (!bg && !Policy::getBackground(shape)) ||
151 (bg && Policy::compareTo(bg, Policy::getBackground(shape)))
152 )) {
153
154 return false;
155 }
156 }
157
158 return true;
159}