|
Krita Source Code Documentation
|
#include <KoCompositeColorTransformation.h>
Inheritance diagram for KoCompositeColorTransformation:Public Types | |
| enum | Mode { INPLACE = 0 , BUFFERED } |
Public Member Functions | |
| void | appendTransform (KoColorTransformation *transform) |
| KoCompositeColorTransformation (Mode mode) | |
| void | transform (const quint8 *src, quint8 *dst, qint32 nPixels) const override |
| ~KoCompositeColorTransformation () override | |
| ~Private () | |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Public Member Functions inherited from KoColorTransformation | |
| virtual bool | isValid () const |
| virtual int | parameterId (const QString &name) const |
| virtual QList< QString > | parameters () const |
| virtual void | setParameter (int id, const QVariant ¶meter) |
| void | setParameters (const QHash< QString, QVariant > ¶meters) |
| virtual | ~KoColorTransformation () |
Static Public Member Functions | |
| static KoColorTransformation * | createOptimizedCompositeTransform (const QVector< KoColorTransformation * > transforms) |
Public Attributes | |
| QVector< KoColorTransformation * > | transformations |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
A class for storing a composite color transformation. All the transformations added with appendTransform() are applied sequentially to the process pixels.
mode defines how the buffers are used while processing.
When using INPLACE mode all transformations but the first one do the conversion in place, that is in dst buffer. That is dst is written at least N - 1 times, where N is the number of embedded transformations.
In BUFFERED mode all the transformations are called with distinct src and dst buffers, which are created in temporary memory owned by KoCompositeColorTransformation. Please note that this mode IS NOT IMPLEMENTED YET!
Definition at line 12 of file KoCompositeColorTransformation.cpp.
| Enumerator | |
|---|---|
| INPLACE | |
| BUFFERED | transform pixels in place (in 'dst' buffer) transform using a temporary buffer (not implemented yet) |
Definition at line 35 of file KoCompositeColorTransformation.h.
|
inline |
Definition at line 14 of file KoCompositeColorTransformation.cpp.
|
explicit |
Definition at line 22 of file KoCompositeColorTransformation.cpp.
References INPLACE.
|
override |
Definition at line 29 of file KoCompositeColorTransformation.cpp.
| void KoCompositeColorTransformation::appendTransform | ( | KoColorTransformation * | transform | ) |
Append a transform to a composite. If transform is null, nothing happens.
Definition at line 33 of file KoCompositeColorTransformation.cpp.
References m_d, and transform().
|
static |
Convenience method that checks if the transformations in transforms are not null and adds existent ones only. If there is only one non-null transform, it is returned directly to avoid extra virtual calls added by KoCompositeColorTransformation.
Definition at line 55 of file KoCompositeColorTransformation.cpp.
References appendTransform(), INPLACE, and KoCompositeColorTransformation().
|
overridevirtual |
This function apply the transformation on a given number of pixels.
| src | a pointer to the source pixels |
| dst | a pointer to the destination pixels |
| nPixels | the number of pixels |
This function may or may not be thread safe. You need to create one KoColorTransformation per thread.
Implements KoColorTransformation.
Definition at line 40 of file KoCompositeColorTransformation.cpp.
References m_d.
|
private |
Definition at line 62 of file KoCompositeColorTransformation.h.
| QVector<KoColorTransformation*> KoCompositeColorTransformation::transformations |
Definition at line 18 of file KoCompositeColorTransformation.cpp.