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 <QBuffer>
#include <KoMD5Generator.h>
#include <KisResourceModel.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 897 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 895 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 901 of file kis_asl_layer_style_serializer.cpp.

901#define CONN_COMPOSITE_OP(addr, method, object, type, prefix) \
902 { \
903 std::function<void(const QString &)> setter = std::bind(&type::method, object, _1); \
904 m_catcher.subscribeEnum(_prepaddr(prefix, addr), "BlnM", std::bind(convertAndSetBlendMode, _1, setter)); \
905 }

◆ 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 907 of file kis_asl_layer_style_serializer.cpp.

907#define CONN_CURVE(addr, method, object, type, prefix) \
908 { \
909 std::function<void(const quint8 *)> setter = std::bind(&type::method, object, _1); \
910 m_catcher.subscribeCurve(_prepaddr(prefix, addr), std::bind(convertAndSetCurve, _1, _2, setter)); \
911 }

◆ 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 913 of file kis_asl_layer_style_serializer.cpp.

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

◆ 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 919 of file kis_asl_layer_style_serializer.cpp.

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

◆ 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 925 of file kis_asl_layer_style_serializer.cpp.

925#define CONN_PATTERN(addr, method, object, type, prefix) \
926 { \
927 std::function<void(KoPatternSP)> setter = std::bind(&type::method, object, _1); \
928 m_catcher.subscribePatternRef(_prepaddr(prefix, addr), std::bind(&KisAslLayerStyleSerializer::assignPatternObject, this, _1, _2, setter)); \
929 }

◆ 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 899 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 894 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 896 of file kis_asl_layer_style_serializer.cpp.

Function Documentation

◆ _prepaddr()

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

Definition at line 890 of file kis_asl_layer_style_serializer.cpp.

890 {
891 return pref + addr;
892}

◆ bevelStyleToString()

QString bevelStyleToString ( psd_bevel_style style)

Definition at line 177 of file kis_asl_layer_style_serializer.cpp.

178{
179 QString result = "OtrB";
180
181 switch (style) {
183 result = "OtrB";
184 break;
186 result = "InrB";
187 break;
188 case psd_bevel_emboss:
189 result = "Embs";
190 break;
192 result = "PlEb";
193 break;
195 result = "strokeEmboss";
196 break;
197 }
198
199 return result;
200}
@ 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 89 of file kis_asl_layer_style_serializer.cpp.

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

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

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 875 of file kis_asl_layer_style_serializer.cpp.

876{
877 Q_UNUSED(name);
878 Q_UNUSED(points);
879 Q_UNUSED(setCurveLookupTable);
880
881 warnKrita << "convertAndSetBlendMode:" << "Curve conversion is not implemented yet";
882}
#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 885 of file kis_asl_layer_style_serializer.cpp.

886{
887 setMappedValue(map[value]);
888}
float value(const T *src, size_t ch)

References value().

◆ fetchPatternUuidSafe()

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

Definition at line 304 of file kis_asl_layer_style_serializer.cpp.

305{
306 if (patternToUuid.contains(pattern)) {
307 return patternToUuid[pattern];
308 } else {
309 warnKrita << "WARNING: the pattern is not present in the Uuid map!";
310 return "invalid-uuid";
311 }
312}

References warnKrita.

◆ findNodeByClassId()

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

Definition at line 727 of file kis_asl_layer_style_serializer.cpp.

727 {
728 return KisDomUtils::findElementByAttribute(parent, "node", "classId", classId);
729}
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 202 of file kis_asl_layer_style_serializer.cpp.

203{
204 QString result = "Lnr ";
205
206 switch (style) {
208 result = "Lnr ";
209 break;
211 result = "Rdl ";
212 break;
214 result = "Angl";
215 break;
217 result = "Rflc";
218 break;
220 result = "Dmnd";
221 break;
222 }
223
224 return result;
225}
@ 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 731 of file kis_asl_layer_style_serializer.cpp.

732{
733 QDomNode node;
734
735 do {
736 node = dst.lastChild();
737 dst.removeChild(node);
738
739 } while(!node.isNull());
740
741
742 node = src.firstChild();
743 while(!node.isNull()) {
744 dst.appendChild(node);
745 node = src.firstChild();
746 }
747
748 src.parentNode().removeChild(src);
749}

◆ strokeFillTypeToString()

QString strokeFillTypeToString ( psd_fill_type position)

Definition at line 246 of file kis_asl_layer_style_serializer.cpp.

247{
248 QString result = "SClr";
249
250 switch (position) {
252 result = "SClr";
253 break;
255 result = "GrFl";
256 break;
257 case psd_fill_pattern:
258 result = "Ptrn";
259 break;
260 }
261
262 return result;
263}
@ 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 227 of file kis_asl_layer_style_serializer.cpp.

228{
229 QString result = "OutF";
230
231 switch (position) {
233 result = "OutF";
234 break;
236 result = "InsF";
237 break;
239 result = "CtrF";
240 break;
241 }
242
243 return result;
244}
@ 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 154 of file kis_asl_layer_style_serializer.cpp.

155{
156 QString result = "SfBL";
157
158 switch (technique) {
160 result = "SfBL";
161 break;
163 result = "PrBL";
164 break;
166 result = "Slmt";
167 break;
168 }
169
170 if (typeId == "BETE" && technique == psd_technique_slope_limit) {
171 warnKrita << "WARNING: techniqueToString: invalid technique type!" << ppVar(technique) << ppVar(typeId);
172 }
173
174 return result;
175}
#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.