Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_asl_layer_style_serializer.cpp File Reference
#include "kis_asl_layer_style_serializer.h"
#include "kis_image.h"
#include <QDomDocument>
#include <QMultiHash>
#include <KisResourceModel.h>
#include <KisEmbeddedResourceStorageProxy.h>
#include <KoResourceServerProvider.h>
#include <resources/KoAbstractGradient.h>
#include <resources/KoSegmentGradient.h>
#include <resources/KoStopGradient.h>
#include <resources/KoPattern.h>
#include "kis_layer_utils.h"
#include "kis_dom_utils.h"
#include <kis_layer.h>
#include <kis_pointer_utils.h>
#include "psd.h"
#include "kis_global.h"
#include "asl/kis_asl_reader.h"
#include "asl/kis_asl_xml_parser.h"
#include "asl/kis_asl_writer_utils.h"
#include "asl/kis_asl_xml_writer.h"
#include "asl/kis_asl_writer.h"
#include <functional>

Go to the source code of this file.

Classes

class  FillStylesCorrector
 

Macros

#define CONN_BOOL(addr, method, object, type, prefix)   m_catcher.subscribeBoolean(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))
 
#define CONN_COLOR(addr, method, object, type, prefix)   m_catcher.subscribeColor(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))
 
#define CONN_COMPOSITE_OP(addr, method, object, type, prefix)
 
#define CONN_CURVE(addr, method, object, type, prefix)
 
#define CONN_ENUM(addr, tag, method, map, mapped_type, object, type, prefix)
 
#define CONN_GRADIENT(addr, method, object, type, prefix)
 
#define CONN_PATTERN(addr, method, object, type, prefix)
 
#define CONN_POINT(addr, method, object, type, prefix)   m_catcher.subscribePoint(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))
 
#define CONN_TEXT_RADDR(addr, method, object, type)   m_catcher.subscribeText(addr, std::bind(&type::method, object, _1))
 
#define CONN_UNITF(addr, unit, method, object, type, prefix)   m_catcher.subscribeUnitFloat(_prepaddr(prefix, addr), unit, std::bind(&type::method, object, _1))
 

Functions

QString _prepaddr (const QString &pref, const QString &addr)
 
QString bevelStyleToString (psd_bevel_style style)
 
QString compositeOpToBlendMode (const QString &compositeOp)
 
void convertAndSetBlendMode (const QString &mode, std::function< void(const QString &)> setBlendMode)
 
void convertAndSetCurve (const QString &name, const QVector< QPointF > &points, std::function< void(const quint8 *)> setCurveLookupTable)
 
template<typename T >
void convertAndSetEnum (const QString &value, const QMap< QString, T > map, std::function< void(T)> setMappedValue)
 
QString fetchPatternUuidSafe (KoPatternSP pattern, QHash< KoPatternSP, QString > patternToUuid)
 
QDomNode findNodeByClassId (const QString &classId, QDomNode parent)
 
QString gradientTypeToString (psd_gradient_style style)
 
void replaceAllChildren (QDomNode src, QDomNode dst)
 
QString strokeFillTypeToString (psd_fill_type position)
 
QString strokePositionToString (psd_stroke_position position)
 
QString techniqueToString (psd_technique_type technique, const QString &typeId)
 

Macro Definition Documentation

◆ CONN_BOOL

#define CONN_BOOL ( addr,
method,
object,
type,
prefix )   m_catcher.subscribeBoolean(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))

Definition at line 892 of file kis_asl_layer_style_serializer.cpp.

◆ CONN_COLOR

#define CONN_COLOR ( addr,
method,
object,
type,
prefix )   m_catcher.subscribeColor(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))

Definition at line 890 of file kis_asl_layer_style_serializer.cpp.

◆ CONN_COMPOSITE_OP

#define CONN_COMPOSITE_OP ( addr,
method,
object,
type,
prefix )
Value:
{ \
std::function<void(const QString &)> setter = std::bind(&type::method, object, _1); \
m_catcher.subscribeEnum(_prepaddr(prefix, addr), "BlnM", std::bind(convertAndSetBlendMode, _1, setter)); \
}
QString _prepaddr(const QString &pref, const QString &addr)
void convertAndSetBlendMode(const QString &mode, std::function< void(const QString &)> setBlendMode)
typedef void(QOPENGLF_APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer)

Definition at line 896 of file kis_asl_layer_style_serializer.cpp.

896#define CONN_COMPOSITE_OP(addr, method, object, type, prefix) \
897 { \
898 std::function<void(const QString &)> setter = std::bind(&type::method, object, _1); \
899 m_catcher.subscribeEnum(_prepaddr(prefix, addr), "BlnM", std::bind(convertAndSetBlendMode, _1, setter)); \
900 }

◆ CONN_CURVE

#define CONN_CURVE ( addr,
method,
object,
type,
prefix )
Value:
{ \
std::function<void(const quint8 *)> setter = std::bind(&type::method, object, _1); \
m_catcher.subscribeCurve(_prepaddr(prefix, addr), std::bind(convertAndSetCurve, _1, _2, setter)); \
}
void convertAndSetCurve(const QString &name, const QVector< QPointF > &points, std::function< void(const quint8 *)> setCurveLookupTable)

Definition at line 902 of file kis_asl_layer_style_serializer.cpp.

902#define CONN_CURVE(addr, method, object, type, prefix) \
903 { \
904 std::function<void(const quint8 *)> setter = std::bind(&type::method, object, _1); \
905 m_catcher.subscribeCurve(_prepaddr(prefix, addr), std::bind(convertAndSetCurve, _1, _2, setter)); \
906 }

◆ CONN_ENUM

#define CONN_ENUM ( addr,
tag,
method,
map,
mapped_type,
object,
type,
prefix )
Value:
{ \
std::function<void(mapped_type)> setter = std::bind(&type::method, object, _1); \
m_catcher.subscribeEnum(_prepaddr(prefix, addr), tag, std::bind(convertAndSetEnum<mapped_type>, _1, map, setter)); \
}

Definition at line 908 of file kis_asl_layer_style_serializer.cpp.

908#define CONN_ENUM(addr, tag, method, map, mapped_type, object, type, prefix) \
909 { \
910 std::function<void(mapped_type)> setter = std::bind(&type::method, object, _1); \
911 m_catcher.subscribeEnum(_prepaddr(prefix, addr), tag, std::bind(convertAndSetEnum<mapped_type>, _1, map, setter)); \
912 }

◆ CONN_GRADIENT

#define CONN_GRADIENT ( addr,
method,
object,
type,
prefix )
Value:
{ \
std::function<void(KoAbstractGradientSP)> setter = std::bind(&type::method, object, _1); \
m_catcher.subscribeGradient(_prepaddr(prefix, addr), std::bind(&KisAslLayerStyleSerializer::assignGradientObject, this, _1, setter)); \
}
void assignGradientObject(KoAbstractGradientSP gradient, std::function< void(KoAbstractGradientSP)> setGradient)

Definition at line 914 of file kis_asl_layer_style_serializer.cpp.

914#define CONN_GRADIENT(addr, method, object, type, prefix) \
915 { \
916 std::function<void(KoAbstractGradientSP)> setter = std::bind(&type::method, object, _1); \
917 m_catcher.subscribeGradient(_prepaddr(prefix, addr), std::bind(&KisAslLayerStyleSerializer::assignGradientObject, this, _1, setter)); \
918 }

◆ CONN_PATTERN

#define CONN_PATTERN ( addr,
method,
object,
type,
prefix )
Value:
{ \
std::function<void(KoPatternSP)> setter = std::bind(&type::method, object, _1); \
m_catcher.subscribePatternRef(_prepaddr(prefix, addr), std::bind(&KisAslLayerStyleSerializer::assignPatternObject, this, _1, _2, setter)); \
}
void assignPatternObject(const QString &patternUuid, const QString &patternName, std::function< void(KoPatternSP)> setPattern)

Definition at line 920 of file kis_asl_layer_style_serializer.cpp.

920#define CONN_PATTERN(addr, method, object, type, prefix) \
921 { \
922 std::function<void(KoPatternSP)> setter = std::bind(&type::method, object, _1); \
923 m_catcher.subscribePatternRef(_prepaddr(prefix, addr), std::bind(&KisAslLayerStyleSerializer::assignPatternObject, this, _1, _2, setter)); \
924 }

◆ CONN_POINT

#define CONN_POINT ( addr,
method,
object,
type,
prefix )   m_catcher.subscribePoint(_prepaddr(prefix, addr), std::bind(&type::method, object, _1))

Definition at line 894 of file kis_asl_layer_style_serializer.cpp.

◆ CONN_TEXT_RADDR

#define CONN_TEXT_RADDR ( addr,
method,
object,
type )   m_catcher.subscribeText(addr, std::bind(&type::method, object, _1))

Definition at line 889 of file kis_asl_layer_style_serializer.cpp.

◆ CONN_UNITF

#define CONN_UNITF ( addr,
unit,
method,
object,
type,
prefix )   m_catcher.subscribeUnitFloat(_prepaddr(prefix, addr), unit, std::bind(&type::method, object, _1))

Definition at line 891 of file kis_asl_layer_style_serializer.cpp.

Function Documentation

◆ _prepaddr()

QString _prepaddr ( const QString & pref,
const QString & addr )
inline

Definition at line 885 of file kis_asl_layer_style_serializer.cpp.

885 {
886 return pref + addr;
887}

◆ bevelStyleToString()

QString bevelStyleToString ( psd_bevel_style style)

Definition at line 175 of file kis_asl_layer_style_serializer.cpp.

176{
177 QString result = "OtrB";
178
179 switch (style) {
181 result = "OtrB";
182 break;
184 result = "InrB";
185 break;
186 case psd_bevel_emboss:
187 result = "Embs";
188 break;
190 result = "PlEb";
191 break;
193 result = "strokeEmboss";
194 break;
195 }
196
197 return result;
198}
@ psd_bevel_pillow_emboss
Definition psd.h:138
@ psd_bevel_inner_bevel
Definition psd.h:136
@ psd_bevel_stroke_emboss
Definition psd.h:139
@ psd_bevel_outer_bevel
Definition psd.h:135
@ psd_bevel_emboss
Definition psd.h:137

References psd_bevel_emboss, psd_bevel_inner_bevel, psd_bevel_outer_bevel, psd_bevel_pillow_emboss, and psd_bevel_stroke_emboss.

◆ compositeOpToBlendMode()

QString compositeOpToBlendMode ( const QString & compositeOp)

Definition at line 87 of file kis_asl_layer_style_serializer.cpp.

88{
89 QString mode = "Nrml";
90
91 if (compositeOp == COMPOSITE_OVER) {
92 mode = "Nrml";
93 } else if (compositeOp == COMPOSITE_DISSOLVE) {
94 mode = "Dslv";
95 } else if (compositeOp == COMPOSITE_DARKEN) {
96 mode = "Drkn";
97 } else if (compositeOp == COMPOSITE_MULT) {
98 mode = "Mltp";
99 } else if (compositeOp == COMPOSITE_BURN) {
100 mode = "CBrn";
101 } else if (compositeOp == COMPOSITE_LINEAR_BURN) {
102 mode = "linearBurn";
103 } else if (compositeOp == COMPOSITE_DARKER_COLOR) {
104 mode = "darkerColor";
105 } else if (compositeOp == COMPOSITE_LIGHTEN) {
106 mode = "Lghn";
107 } else if (compositeOp == COMPOSITE_SCREEN) {
108 mode = "Scrn";
109 } else if (compositeOp == COMPOSITE_DODGE) {
110 mode = "CDdg";
111 } else if (compositeOp == COMPOSITE_LINEAR_DODGE) {
112 mode = "linearDodge";
113 } else if (compositeOp == COMPOSITE_LIGHTER_COLOR) {
114 mode = "lighterColor";
115 } else if (compositeOp == COMPOSITE_OVERLAY) {
116 mode = "Ovrl";
117 } else if (compositeOp == COMPOSITE_SOFT_LIGHT_PHOTOSHOP) {
118 mode = "SftL";
119 } else if (compositeOp == COMPOSITE_HARD_LIGHT) {
120 mode = "HrdL";
121 } else if (compositeOp == COMPOSITE_VIVID_LIGHT) {
122 mode = "vividLight";
123 } else if (compositeOp == COMPOSITE_LINEAR_LIGHT) {
124 mode = "linearLight";
125 } else if (compositeOp == COMPOSITE_PIN_LIGHT) {
126 mode = "pinLight";
127 } else if (compositeOp == COMPOSITE_HARD_MIX_PHOTOSHOP) {
128 mode = "hardMix";
129 } else if (compositeOp == COMPOSITE_DIFF) {
130 mode = "Dfrn";
131 } else if (compositeOp == COMPOSITE_EXCLUSION) {
132 mode = "Xclu";
133 } else if (compositeOp == COMPOSITE_SUBTRACT) {
134 mode = "Sbtr";
135 } else if (compositeOp == COMPOSITE_DIVIDE) {
136 mode = "divide";
137 } else if (compositeOp == COMPOSITE_HUE) {
138 mode = "H ";
139 } else if (compositeOp == COMPOSITE_SATURATION) {
140 mode = "Strt";
141 } else if (compositeOp == COMPOSITE_COLOR) {
142 mode = "Clr ";
143 } else if (compositeOp == COMPOSITE_LUMINIZE) {
144 mode = "Lmns";
145 } else {
146 dbgKrita << "Unknown composite op:" << mode << "Returning \"Nrml\"!";
147 }
148
149 return mode;
150}
const QString COMPOSITE_OVER
const QString COMPOSITE_DARKEN
const QString COMPOSITE_OVERLAY
const QString COMPOSITE_DIVIDE
const QString COMPOSITE_DODGE
const QString COMPOSITE_LIGHTEN
const QString COMPOSITE_LINEAR_BURN
const QString COMPOSITE_SOFT_LIGHT_PHOTOSHOP
const QString COMPOSITE_LIGHTER_COLOR
const QString COMPOSITE_MULT
const QString COMPOSITE_SATURATION
const QString COMPOSITE_LINEAR_LIGHT
const QString COMPOSITE_HARD_LIGHT
const QString COMPOSITE_SCREEN
const QString COMPOSITE_PIN_LIGHT
const QString COMPOSITE_DIFF
const QString COMPOSITE_HUE
const QString COMPOSITE_SUBTRACT
const QString COMPOSITE_DISSOLVE
const QString COMPOSITE_BURN
const QString COMPOSITE_LINEAR_DODGE
const QString COMPOSITE_COLOR
const QString COMPOSITE_EXCLUSION
const QString COMPOSITE_DARKER_COLOR
const QString COMPOSITE_VIVID_LIGHT
const QString COMPOSITE_LUMINIZE
const QString COMPOSITE_HARD_MIX_PHOTOSHOP
#define dbgKrita
Definition kis_debug.h:45

References COMPOSITE_BURN, COMPOSITE_COLOR, COMPOSITE_DARKEN, COMPOSITE_DARKER_COLOR, COMPOSITE_DIFF, COMPOSITE_DISSOLVE, COMPOSITE_DIVIDE, COMPOSITE_DODGE, COMPOSITE_EXCLUSION, COMPOSITE_HARD_LIGHT, COMPOSITE_HARD_MIX_PHOTOSHOP, COMPOSITE_HUE, COMPOSITE_LIGHTEN, COMPOSITE_LIGHTER_COLOR, COMPOSITE_LINEAR_BURN, COMPOSITE_LINEAR_DODGE, COMPOSITE_LINEAR_LIGHT, COMPOSITE_LUMINIZE, COMPOSITE_MULT, COMPOSITE_OVER, COMPOSITE_OVERLAY, COMPOSITE_PIN_LIGHT, COMPOSITE_SATURATION, COMPOSITE_SCREEN, COMPOSITE_SOFT_LIGHT_PHOTOSHOP, COMPOSITE_SUBTRACT, COMPOSITE_VIVID_LIGHT, and dbgKrita.

◆ convertAndSetBlendMode()

void convertAndSetBlendMode ( const QString & mode,
std::function< void(const QString &)> setBlendMode )

Definition at line 805 of file kis_asl_layer_style_serializer.cpp.

806{
807 QString compositeOp = COMPOSITE_OVER;
808
809 if (mode == "Nrml") {
810 compositeOp = COMPOSITE_OVER;
811 } else if (mode == "Dslv") {
812 compositeOp = COMPOSITE_DISSOLVE;
813 } else if (mode == "Drkn") {
814 compositeOp = COMPOSITE_DARKEN;
815 } else if (mode == "Mltp") {
816 compositeOp = COMPOSITE_MULT;
817 } else if (mode == "CBrn") {
818 compositeOp = COMPOSITE_BURN;
819 } else if (mode == "linearBurn") {
820 compositeOp = COMPOSITE_LINEAR_BURN;
821 } else if (mode == "darkerColor") {
822 compositeOp = COMPOSITE_DARKER_COLOR;
823 } else if (mode == "Lghn") {
824 compositeOp = COMPOSITE_LIGHTEN;
825 } else if (mode == "Scrn") {
826 compositeOp = COMPOSITE_SCREEN;
827 } else if (mode == "CDdg") {
828 compositeOp = COMPOSITE_DODGE;
829 } else if (mode == "linearDodge") {
830 compositeOp = COMPOSITE_LINEAR_DODGE;
831 } else if (mode == "lighterColor") {
832 compositeOp = COMPOSITE_LIGHTER_COLOR;
833 } else if (mode == "Ovrl") {
834 compositeOp = COMPOSITE_OVERLAY;
835 } else if (mode == "SftL") {
836 compositeOp = COMPOSITE_SOFT_LIGHT_PHOTOSHOP;
837 } else if (mode == "HrdL") {
838 compositeOp = COMPOSITE_HARD_LIGHT;
839 } else if (mode == "vividLight") {
840 compositeOp = COMPOSITE_VIVID_LIGHT;
841 } else if (mode == "linearLight") {
842 compositeOp = COMPOSITE_LINEAR_LIGHT;
843 } else if (mode == "pinLight") {
844 compositeOp = COMPOSITE_PIN_LIGHT;
845 } else if (mode == "hardMix") {
846 compositeOp = COMPOSITE_HARD_MIX_PHOTOSHOP;
847 } else if (mode == "Dfrn") {
848 compositeOp = COMPOSITE_DIFF;
849 } else if (mode == "Xclu") {
850 compositeOp = COMPOSITE_EXCLUSION;
851 } else if (mode == "Sbtr") {
852 compositeOp = COMPOSITE_SUBTRACT;
853 } else if (mode == "divide") {
854 compositeOp = COMPOSITE_DIVIDE;
855 } else if (mode == "H ") {
856 compositeOp = COMPOSITE_HUE;
857 } else if (mode == "Strt") {
858 compositeOp = COMPOSITE_SATURATION;
859 } else if (mode == "Clr ") {
860 compositeOp = COMPOSITE_COLOR;
861 } else if (mode == "Lmns") {
862 compositeOp = COMPOSITE_LUMINIZE;
863 } else {
864 dbgKrita << "Unknown blending mode:" << mode << "Returning COMPOSITE_OVER!";
865 }
866
867 setBlendMode(compositeOp);
868}

References COMPOSITE_BURN, COMPOSITE_COLOR, COMPOSITE_DARKEN, COMPOSITE_DARKER_COLOR, COMPOSITE_DIFF, COMPOSITE_DISSOLVE, COMPOSITE_DIVIDE, COMPOSITE_DODGE, COMPOSITE_EXCLUSION, COMPOSITE_HARD_LIGHT, COMPOSITE_HARD_MIX_PHOTOSHOP, COMPOSITE_HUE, COMPOSITE_LIGHTEN, COMPOSITE_LIGHTER_COLOR, COMPOSITE_LINEAR_BURN, COMPOSITE_LINEAR_DODGE, COMPOSITE_LINEAR_LIGHT, COMPOSITE_LUMINIZE, COMPOSITE_MULT, COMPOSITE_OVER, COMPOSITE_OVERLAY, COMPOSITE_PIN_LIGHT, COMPOSITE_SATURATION, COMPOSITE_SCREEN, COMPOSITE_SOFT_LIGHT_PHOTOSHOP, COMPOSITE_SUBTRACT, COMPOSITE_VIVID_LIGHT, and dbgKrita.

◆ convertAndSetCurve()

void convertAndSetCurve ( const QString & name,
const QVector< QPointF > & points,
std::function< void(const quint8 *)> setCurveLookupTable )

Definition at line 870 of file kis_asl_layer_style_serializer.cpp.

871{
872 Q_UNUSED(name);
873 Q_UNUSED(points);
874 Q_UNUSED(setCurveLookupTable);
875
876 warnKrita << "convertAndSetBlendMode:" << "Curve conversion is not implemented yet";
877}
#define warnKrita
Definition kis_debug.h:87

References warnKrita.

◆ convertAndSetEnum()

template<typename T >
void convertAndSetEnum ( const QString & value,
const QMap< QString, T > map,
std::function< void(T)> setMappedValue )

Definition at line 880 of file kis_asl_layer_style_serializer.cpp.

881{
882 setMappedValue(map[value]);
883}
float value(const T *src, size_t ch)

References value().

◆ fetchPatternUuidSafe()

QString fetchPatternUuidSafe ( KoPatternSP pattern,
QHash< KoPatternSP, QString > patternToUuid )

Definition at line 292 of file kis_asl_layer_style_serializer.cpp.

293{
294 if (patternToUuid.contains(pattern)) {
295 return patternToUuid[pattern];
296 } else {
297 warnKrita << "WARNING: the pattern is not present in the Uuid map!";
298 return "invalid-uuid";
299 }
300}

References warnKrita.

◆ findNodeByClassId()

QDomNode findNodeByClassId ( const QString & classId,
QDomNode parent )
inline

Definition at line 713 of file kis_asl_layer_style_serializer.cpp.

713 {
714 return KisDomUtils::findElementByAttribute(parent, "node", "classId", classId);
715}
QDomElement findElementByAttribute(QDomNode parent, const QString &tag, const QString &attribute, const QString &value)

References KisDomUtils::findElementByAttribute().

◆ gradientTypeToString()

QString gradientTypeToString ( psd_gradient_style style)

Definition at line 200 of file kis_asl_layer_style_serializer.cpp.

201{
202 QString result = "Lnr ";
203
204 switch (style) {
206 result = "Lnr ";
207 break;
209 result = "Rdl ";
210 break;
212 result = "Angl";
213 break;
215 result = "Rflc";
216 break;
218 result = "Dmnd";
219 break;
220 }
221
222 return result;
223}
@ psd_gradient_style_linear
Definition psd.h:102
@ psd_gradient_style_reflected
Definition psd.h:105
@ psd_gradient_style_angle
Definition psd.h:104
@ psd_gradient_style_radial
Definition psd.h:103
@ psd_gradient_style_diamond
Definition psd.h:106

References psd_gradient_style_angle, psd_gradient_style_diamond, psd_gradient_style_linear, psd_gradient_style_radial, and psd_gradient_style_reflected.

◆ replaceAllChildren()

void replaceAllChildren ( QDomNode src,
QDomNode dst )

Definition at line 717 of file kis_asl_layer_style_serializer.cpp.

718{
719 QDomNode node;
720
721 do {
722 node = dst.lastChild();
723 dst.removeChild(node);
724
725 } while(!node.isNull());
726
727
728 node = src.firstChild();
729 while(!node.isNull()) {
730 dst.appendChild(node);
731 node = src.firstChild();
732 }
733
734 src.parentNode().removeChild(src);
735}

◆ strokeFillTypeToString()

QString strokeFillTypeToString ( psd_fill_type position)

Definition at line 244 of file kis_asl_layer_style_serializer.cpp.

245{
246 QString result = "SClr";
247
248 switch (position) {
250 result = "SClr";
251 break;
253 result = "GrFl";
254 break;
255 case psd_fill_pattern:
256 result = "Ptrn";
257 break;
258 }
259
260 return result;
261}
@ psd_fill_solid_color
Definition psd.h:124
@ psd_fill_gradient
Definition psd.h:125
@ psd_fill_pattern
Definition psd.h:126

References psd_fill_gradient, psd_fill_pattern, and psd_fill_solid_color.

◆ strokePositionToString()

QString strokePositionToString ( psd_stroke_position position)

Definition at line 225 of file kis_asl_layer_style_serializer.cpp.

226{
227 QString result = "OutF";
228
229 switch (position) {
231 result = "OutF";
232 break;
234 result = "InsF";
235 break;
237 result = "CtrF";
238 break;
239 }
240
241 return result;
242}
@ psd_stroke_outside
Definition psd.h:121
@ psd_stroke_inside
Definition psd.h:121
@ psd_stroke_center
Definition psd.h:121

References psd_stroke_center, psd_stroke_inside, and psd_stroke_outside.

◆ techniqueToString()

QString techniqueToString ( psd_technique_type technique,
const QString & typeId )

Definition at line 152 of file kis_asl_layer_style_serializer.cpp.

153{
154 QString result = "SfBL";
155
156 switch (technique) {
158 result = "SfBL";
159 break;
161 result = "PrBL";
162 break;
164 result = "Slmt";
165 break;
166 }
167
168 if (typeId == "BETE" && technique == psd_technique_slope_limit) {
169 warnKrita << "WARNING: techniqueToString: invalid technique type!" << ppVar(technique) << ppVar(typeId);
170 }
171
172 return result;
173}
#define ppVar(var)
Definition kis_debug.h:155
@ psd_technique_softer
Definition psd.h:116
@ psd_technique_precise
Definition psd.h:117
@ psd_technique_slope_limit
Definition psd.h:118

References ppVar, psd_technique_precise, psd_technique_slope_limit, psd_technique_softer, and warnKrita.