7#ifndef __KIS_BRUSHES_PIPE_H
8#define __KIS_BRUSHES_PIPE_H
18template<
class BrushType>
58 return brush ? brush->maskWidth(shape, subPixelX, subPixelY, info) : 0;
63 return brush ? brush->maskHeight(shape, subPixelX, subPixelY, info) : 0;
68 brush->setAngle(angle);
74 brush->setScale(scale);
80 brush->setSpacing(spacing);
86 if (brush->isImageType())
return true;
93 if (brush->hasColorAndTransparency())
return true;
100 brush->setBrushApplication(brushApplication);
106 brush->setGradient(gradient);
123 double subPixelX ,
double subPixelY,
130 brush->generateMaskAndApplyMaskOrCreateDab(dst, coloringInformation, shape, info, subPixelX, subPixelY, softnessFactor, lightnessStrength);
136 double subPixelX,
double subPixelY) {
139 if (!brush)
return 0;
147 brush->notifyBrushIsGoingToBeClonedForStroke();
virtual int currentBrushIndex()=0
QSharedPointer< BrushType > firstBrush() const
QVector< QSharedPointer< BrushType > > m_brushes
void setSpacing(double spacing)
KisBrushesPipe(const KisBrushesPipe &rhs)
QSharedPointer< BrushType > currentBrush(const KisPaintInformation &info)
KisFixedPaintDeviceSP paintDevice(const KoColorSpace *colorSpace, KisDabShape const &shape, const KisPaintInformation &info, double subPixelX, double subPixelY)
virtual void notifyStrokeStarted()=0
QSharedPointer< BrushType > lastBrush() const
virtual void updateBrushIndexes(KisRandomSourceSP randomSource, int seqNo)=0
qint32 maskWidth(KisDabShape const &shape, double subPixelX, double subPixelY, const KisPaintInformation &info)
void notifyBrushIsGoingToBeClonedForStroke()
bool hasColorAndTransparency() const
void setGradient(KoAbstractGradientSP gradient) const
virtual ~KisBrushesPipe()
void addBrush(QSharedPointer< BrushType > brush)
void generateMaskAndApplyMaskOrCreateDab(KisFixedPaintDeviceSP dst, KisBrush::ColoringInformation *coloringInformation, KisDabShape const &shape, const KisPaintInformation &info, double subPixelX, double subPixelY, qreal softnessFactor, qreal lightnessStrength=DEFAULT_LIGHTNESS_STRENGTH)
QVector< QSharedPointer< BrushType > > brushes()
void prepareForSeqNo(const KisPaintInformation &info, int seqNo)
virtual int chooseNextBrush(const KisPaintInformation &info)=0
qint32 maskHeight(KisDabShape const &shape, double subPixelX, double subPixelY, const KisPaintInformation &info)
void setBrushApplication(enumBrushApplication brushApplication) const
void setAngle(qreal angle)
void setScale(qreal scale)
void testingSelectNextBrush(const KisPaintInformation &info)
#define KIS_ASSERT_RECOVER(cond)
static const qreal DEFAULT_LIGHTNESS_STRENGTH
KisSharedPtr< KisRandomSource > KisRandomSourceSP
typedef void(QOPENGLF_APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer)