Krita Source Code Documentation
Loading...
Searching...
No Matches
KisBrush::Private Struct Reference

Public Member Functions

 Private ()
 
 Private (const Private &rhs)
 
 ~Private ()
 

Public Attributes

qreal angle
 
bool autoSpacingActive
 
qreal autoSpacingCoeff
 
enumBrushApplication brushApplication
 
KisLazySharedCacheStorageLinked< KisOptimizedBrushOutline, const KisBrush * > brushOutline
 
KisLazySharedCacheStorageLinked< KisQImagePyramid, const KisBrush * > brushPyramid
 
QImage brushTipImage
 
enumBrushType brushType
 
QSharedPointer< KoCachedGradientcachedGradient
 
KoAbstractGradientSP gradient
 
bool hasColor
 
qint32 height
 
QPointF hotSpot
 
qreal scale
 
double spacing
 
bool threadingAllowed
 
qint32 width
 

Detailed Description

Definition at line 115 of file kis_brush.cpp.

Constructor & Destructor Documentation

◆ Private() [1/2]

KisBrush::Private::Private ( )
inline

Definition at line 116 of file kis_brush.cpp.

119 , width(0)
120 , height(0)
121 , spacing (1.0)
122 , hasColor(false)
123 , angle(0)
124 , scale(1.0)
125 , gradient(0)
126 , autoSpacingActive(false)
127 , autoSpacingCoeff(1.0)
128 , threadingAllowed(true)
129 , brushPyramid([] (const KisBrush* brush)
130 {
131 return new KisQImagePyramid(brush->brushTipImage());
132 })
134
135 {
136 }
virtual QImage brushTipImage() const
brushImage the image the brush tip can paint with. Not all brush types have a single image.
@ INVALID
Definition kis_brush.h:31
@ ALPHAMASK
Definition kis_brush.h:39
KisOptimizedBrushOutline * outlineFactory(const KisBrush *brush)
KoAbstractGradientSP gradient
enumBrushType brushType
enumBrushApplication brushApplication
KisLazySharedCacheStorageLinked< KisOptimizedBrushOutline, const KisBrush * > brushOutline
KisLazySharedCacheStorageLinked< KisQImagePyramid, const KisBrush * > brushPyramid

◆ Private() [2/2]

KisBrush::Private::Private ( const Private & rhs)
inline

Be careful! The pyramid is shared between two brush objects, therefore you cannot change it, only recreate! That is the reason why it is defined as const!

Take it also into account that the object is defined as KisLazySharedCacheStorage**Linked**, that is, when a cloned object updates the cache, the cache of the source object is also updated. The two caches are detached only when any of the objects calls cache.reset().

Definition at line 138 of file kis_brush.cpp.

139 : brushType(rhs.brushType),
140 brushApplication(rhs.brushApplication),
141 width(rhs.width),
142 height(rhs.height),
143 spacing(rhs.spacing),
144 hotSpot(rhs.hotSpot),
145 hasColor(rhs.hasColor),
146 angle(rhs.angle),
147 scale(rhs.scale),
148 autoSpacingActive(rhs.autoSpacingActive),
149 autoSpacingCoeff(rhs.autoSpacingCoeff),
150 threadingAllowed(rhs.threadingAllowed),
151 brushTipImage(rhs.brushTipImage),
163 brushPyramid(rhs.brushPyramid),
164 brushOutline(rhs.brushOutline)
165 {
166 gradient = rhs.gradient;
167 if (rhs.cachedGradient) {
168 cachedGradient = rhs.cachedGradient->clone().staticCast<KoCachedGradient>();
169 }
170 }
QSharedPointer< KoCachedGradient > cachedGradient

References cachedGradient, and gradient.

◆ ~Private()

KisBrush::Private::~Private ( )
inline

Definition at line 172 of file kis_brush.cpp.

172 {
173 }

Member Data Documentation

◆ angle

qreal KisBrush::Private::angle

Definition at line 183 of file kis_brush.cpp.

◆ autoSpacingActive

bool KisBrush::Private::autoSpacingActive

Definition at line 189 of file kis_brush.cpp.

◆ autoSpacingCoeff

qreal KisBrush::Private::autoSpacingCoeff

Definition at line 190 of file kis_brush.cpp.

◆ brushApplication

enumBrushApplication KisBrush::Private::brushApplication

Definition at line 176 of file kis_brush.cpp.

◆ brushOutline

KisLazySharedCacheStorageLinked<KisOptimizedBrushOutline, const KisBrush*> KisBrush::Private::brushOutline
mutable

Definition at line 195 of file kis_brush.cpp.

◆ brushPyramid

KisLazySharedCacheStorageLinked<KisQImagePyramid, const KisBrush*> KisBrush::Private::brushPyramid
mutable

Definition at line 194 of file kis_brush.cpp.

◆ brushTipImage

QImage KisBrush::Private::brushTipImage

Definition at line 193 of file kis_brush.cpp.

◆ brushType

enumBrushType KisBrush::Private::brushType

Definition at line 175 of file kis_brush.cpp.

◆ cachedGradient

QSharedPointer<KoCachedGradient> KisBrush::Private::cachedGradient

Definition at line 187 of file kis_brush.cpp.

◆ gradient

KoAbstractGradientSP KisBrush::Private::gradient

Definition at line 186 of file kis_brush.cpp.

◆ hasColor

bool KisBrush::Private::hasColor

Definition at line 182 of file kis_brush.cpp.

◆ height

qint32 KisBrush::Private::height

Definition at line 179 of file kis_brush.cpp.

◆ hotSpot

QPointF KisBrush::Private::hotSpot

Definition at line 181 of file kis_brush.cpp.

◆ scale

qreal KisBrush::Private::scale

Definition at line 184 of file kis_brush.cpp.

◆ spacing

double KisBrush::Private::spacing

Definition at line 180 of file kis_brush.cpp.

◆ threadingAllowed

bool KisBrush::Private::threadingAllowed

Definition at line 191 of file kis_brush.cpp.

◆ width

qint32 KisBrush::Private::width

Definition at line 178 of file kis_brush.cpp.


The documentation for this struct was generated from the following file: