Outer Glow, brush Smoothing and the rest of Compositor 1.2.0
This commit is contained in:
1 parent
2cd0d1b86d
commit
374ba8ec73
32 files changed
+624
-47
No files matched your search
@@ -39,6 +39,13 @@ InnerShadowEffect innerShadow(const QJsonValue &value)
|
||||
number(keys.value("red")), number(keys.value("green")), number(keys.value("blue")), number(keys.value("opacity"))};
|
||||
}
|
||||
|
||||
OuterGlowEffect outerGlow(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject keys = object(value);
|
||||
return {optional(keys, "enabled", boolean), number(keys.value("size")), number(keys.value("red")), number(keys.value("green")),
|
||||
number(keys.value("blue")), number(keys.value("opacity"))};
|
||||
}
|
||||
|
||||
void colour(QJsonObject &keys, double red, double green, double blue)
|
||||
{
|
||||
keys.insert("red", red);
|
||||
@@ -51,7 +58,7 @@ LayerEffects ManifestJson::effects(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject keys = object(value);
|
||||
return {optional(keys, "stroke", stroke), optional(keys, "shadow", shadow), optional(keys, "colorOverlay", colorOverlay),
|
||||
optional(keys, "innerShadow", innerShadow)};
|
||||
optional(keys, "innerShadow", innerShadow), optional(keys, "outerGlow", outerGlow)};
|
||||
}
|
||||
|
||||
QJsonObject ManifestJson::encoded(const LayerEffects &effects)
|
||||
@@ -89,5 +96,13 @@ QJsonObject ManifestJson::encoded(const LayerEffects &effects)
|
||||
object.insert("enabled", *inner.enabled);
|
||||
keys.insert("innerShadow", object);
|
||||
}
|
||||
if (effects.outerGlow) {
|
||||
const OuterGlowEffect &glow = *effects.outerGlow;
|
||||
QJsonObject object{{"size", glow.size}, {"opacity", glow.opacity}};
|
||||
colour(object, glow.red, glow.green, glow.blue);
|
||||
if (glow.enabled)
|
||||
object.insert("enabled", *glow.enabled);
|
||||
keys.insert("outerGlow", object);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
Reference in new issue
Block a user