Skip to content

Commit 87b48ca

Browse files
authored
Update gegleffectspending.c
1 parent 76c1a6b commit 87b48ca

1 file changed

Lines changed: 60 additions & 18 deletions

File tree

compile_gegl_effects_here/gegleffectspending.c

Lines changed: 60 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ property_color (optioncolor, _("Text color change (default only works on white
229229
description (_("Default fuctions like a color overlay on the multiply blend mode. Making the color white will make it transparent. If applied to white text it will become any color you choose. Changing the blend mode to solid will make it a normal color fill, and the other blend modes will do their thing respectively if you are using an image. "))
230230
ui_meta ("visible", "guichange {strokeshadow}")
231231

232+
232233
property_enum (colorblendmode, _("Blend Mode of Color Overlay"),
233234
GeglBlendModeTypegzzcolor, gegl_blend_mode_type_effectsgzzcolor,
234235
GEGL_BLEND_MODE_TYPE_MULTIPLY)
@@ -268,8 +269,8 @@ property_double (xstroke, _("Outline Horizontal Position"), 0.0)
268269
ui_meta ("visible", "guichange {outlinespecial}")
269270

270271

271-
property_double (slideupblack, _("Slide up if text color is dark. Black Bevel mode. "), 0.00)
272-
description (_("GEGL Bevel works on black Bevels when using blend modes like Grain Merge and Hardlight. All you have to do is select those blend modes for black text and then move this slider up."))
272+
property_double (slideupblack, _("Black Bevel and Image Bevel mode. "), 0.00)
273+
description (_("When in use GEGL Bevel works correctly on black Bevels when using blend modes like Grain Merge and Hardlight. All you have to do is select those blend modes for black text and then move this slider up. This same slider can also be used so bevel can apply to image file overlay's while ignoring their content."))
273274
value_range (0.00, 0.999)
274275
ui_steps (0.01, 0.50)
275276
ui_meta ("visible", "guichange {innerglowbevel}")
@@ -721,17 +722,17 @@ property_double (opacitystrokeextraoutline, _("Extra Outline/Shadow/Glow's Opaci
721722
value_range (0.0, 0.999)
722723
ui_steps (0.01, 0.50)
723724
ui_meta ("visible", "guichange {extraosg}")
724-
ui_meta ("role", "output-extent")
725-
/* This extra outline opacity slider is hidden via "output-extent" and the one below is to be used.
725+
/* BUG SOLVED JUNE 5th 2023 -- IGNORE COMMENT-- This extra outline opacity slider is hidden via "output-extent" and the one below is to be used.
726726
for opacity control of the second stroke. This is meant to remove a bug where GEGL Effects stacks to copies of the layer on start up.
727727
Unfortunately to enable the extra outline the user has to Enable Extra Outline Checkbox and
728728
slide up the opacity slider. It is what it is though inconvient. Users should be greatful that such complex
729729
text styling is even possible in the first place. */
730730

731-
property_double (extrassgopacity, _("Extra Outline/Shadow/Glow's Opacity (will double stack composition) "), 0.0)
731+
property_double (extrassgopacity, _("Extra Outline/Shadow/Glow's Opacity "), 0.0)
732732
value_range (0.0, 0.999)
733733
ui_steps (0.01, 0.50)
734734
ui_meta ("visible", "guichange {extraosg}")
735+
ui_meta ("role", "output-extent")
735736

736737

737738
property_double (xextraoutline, _("Extra Outline/Shadow/Glow Horizontal Distance"), 0.0)
@@ -924,6 +925,10 @@ typedef struct
924925
GeglNode *solidcolor;
925926
GeglNode *coloropacity;
926927
GeglNode *cropcolor;
928+
GeglNode *strokebehind;
929+
GeglNode *dsbehind;
930+
GeglNode *nopstrokebehind;
931+
GeglNode *nopdsbehind;
927932
} State;
928933

929934
static void
@@ -1030,11 +1035,11 @@ update_graph (GeglOperation *operation)
10301035
if (o->gradient)
10311036
{
10321037
/* both innerglow and gradient */
1033-
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, state->nopm, multiply, state->cropcolor, state->nopg, atopg, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopig, over, state->stroke, state->behindextrassg, state->ds, state->xor, state->output, NULL);
1038+
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, multiply, state->cropcolor, state->nopg, atopg, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopig, over, state->nopstrokebehind, state->strokebehind, state->behindextrassg, state->nopdsbehind, state->dsbehind, state->xor, state->output, NULL);
10341039
gegl_node_link_many (state->nopimage, state->image, state->saturation, NULL);
10351040
gegl_node_link_many (state->nopig, state->innerglow, NULL);
10361041
gegl_node_link_many (state->nopb, state->mbd, state->mbdopacity, NULL);
1037-
gegl_node_link_many (state->nopm, state->mcol, state->coloropacity, NULL);
1042+
gegl_node_link_many (state->mcol, state->coloropacity, NULL);
10381043
gegl_node_link_many (state->knockoutidref, state->opacityinput, NULL);
10391044
gegl_node_connect_from (state->xor, "aux", state->opacityinput, "output");
10401045
gegl_node_connect_from (bevelmode, "aux", state->mbdopacity, "output");
@@ -1044,15 +1049,19 @@ update_graph (GeglOperation *operation)
10441049
gegl_node_connect_from (atopi, "aux", state->saturation, "output");
10451050
gegl_node_link_many (state->nopextrassg, state->extrassg, state->extrassgopacity, NULL);
10461051
gegl_node_connect_from (state->behindextrassg, "aux", state->extrassgopacity, "output");
1052+
gegl_node_connect_from (state->strokebehind, "aux", state->stroke, "output");
1053+
gegl_node_link_many (state->nopstrokebehind, state->stroke, NULL);
1054+
gegl_node_connect_from (state->dsbehind, "aux", state->ds, "output");
1055+
gegl_node_link_many (state->nopdsbehind, state->ds, NULL);
10471056
}
10481057
else
10491058
{
10501059
/* innerglow but no gradient */
1051-
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, state->nopm, multiply, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopig, over, state->stroke, state->behindextrassg, state->ds, state->xor, state->output, NULL);
1060+
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, multiply, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopig, over, state->nopstrokebehind, state->strokebehind, state->behindextrassg, state->nopdsbehind, state->dsbehind, state->xor, state->output, NULL);
10521061
gegl_node_link_many (state->nopimage, state->image, state->saturation, NULL);
10531062
gegl_node_link_many (state->nopig, state->innerglow, NULL);
10541063
gegl_node_link_many (state->nopb, state->mbd, state->mbdopacity, NULL);
1055-
gegl_node_link_many (state->nopm, state->mcol, state->coloropacity, NULL);
1064+
gegl_node_link_many (state->mcol, state->coloropacity, NULL);
10561065
gegl_node_link_many (state->knockoutidref, state->opacityinput, NULL);
10571066
gegl_node_connect_from (state->xor, "aux", state->opacityinput, "output");
10581067
gegl_node_connect_from (bevelmode, "aux", state->mbdopacity, "output");
@@ -1061,17 +1070,21 @@ update_graph (GeglOperation *operation)
10611070
gegl_node_connect_from (atopi, "aux", state->saturation, "output");
10621071
gegl_node_link_many (state->nopextrassg, state->extrassg, state->extrassgopacity, NULL);
10631072
gegl_node_connect_from (state->behindextrassg, "aux", state->extrassgopacity, "output");
1073+
gegl_node_connect_from (state->strokebehind, "aux", state->stroke, "output");
1074+
gegl_node_link_many (state->nopstrokebehind, state->stroke, NULL);
1075+
gegl_node_connect_from (state->dsbehind, "aux", state->ds, "output");
1076+
gegl_node_link_many (state->nopdsbehind, state->ds, NULL);
10641077
}
10651078
}
10661079
else
10671080
{
10681081
if (o->gradient)
10691082
{
10701083
/* gradient but no innerglow */
1071-
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, state->nopm, multiply, state->cropcolor, state->nopg, atopg, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->stroke, state->behindextrassg, state->ds, state->xor, state->output, NULL);
1084+
gegl_node_link_many (state->input, state->thinbold, state->microblur, state->nopimage, atopi, multiply, state->cropcolor, state->nopg, atopg, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopstrokebehind, state->strokebehind, state->behindextrassg, state->nopdsbehind, state->dsbehind, state->xor, state->output, NULL);
10721085
gegl_node_link_many (state->nopimage, state->image, state->saturation, NULL);
10731086
gegl_node_link_many (state->nopb, state->mbd, state->mbdopacity, NULL);
1074-
gegl_node_link_many (state->nopm, state->mcol, state->coloropacity, NULL);
1087+
gegl_node_link_many (state->mcol, state->coloropacity, NULL);
10751088
gegl_node_link_many (state->knockoutidref, state->opacityinput, NULL);
10761089
gegl_node_connect_from (state->xor, "aux", state->opacityinput, "output");
10771090
gegl_node_connect_from (bevelmode, "aux", state->mbdopacity, "output");
@@ -1080,19 +1093,27 @@ update_graph (GeglOperation *operation)
10801093
gegl_node_connect_from (atopi, "aux", state->saturation, "output");
10811094
gegl_node_link_many (state->nopextrassg, state->extrassg, state->extrassgopacity, NULL);
10821095
gegl_node_connect_from (state->behindextrassg, "aux", state->extrassgopacity, "output");
1096+
gegl_node_connect_from (state->strokebehind, "aux", state->stroke, "output");
1097+
gegl_node_link_many (state->nopstrokebehind, state->stroke, NULL);
1098+
gegl_node_connect_from (state->dsbehind, "aux", state->ds, "output");
1099+
gegl_node_link_many (state->nopdsbehind, state->ds, NULL);
10831100
}
10841101
else
10851102
{
10861103
/* neither gradient nor innerglow */
1087-
gegl_node_link_many (state->input, state->microblur, state->thinbold, state->nopimage, atopi, state->nopm, multiply, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->stroke, state->behindextrassg, state->ds, state->xor, state->output, NULL);
1104+
gegl_node_link_many (state->input, state->microblur, state->thinbold, state->nopimage, atopi, multiply, state->crop, state->shiny, state->nopb, bevelmode, state->nopextrassg, state->knockoutidref, state->nopstrokebehind, state->strokebehind, state->behindextrassg, state->nopdsbehind, state->dsbehind, state->xor, state->output, NULL);
10881105
gegl_node_link_many (state->nopimage, state->image, state->saturation, NULL);
10891106
gegl_node_link_many (state->nopb, state->mbd, state->mbdopacity, NULL);
1090-
gegl_node_link_many (state->nopm, state->mcol, state->coloropacity, NULL);
1107+
gegl_node_link_many (state->mcol, state->coloropacity, NULL);
10911108
gegl_node_link_many (state->knockoutidref, state->opacityinput, NULL);
10921109
gegl_node_connect_from (state->xor, "aux", state->opacityinput, "output");
10931110
gegl_node_connect_from (bevelmode, "aux", state->mbdopacity, "output");
10941111
gegl_node_connect_from (multiply, "aux", state->coloropacity, "output");
10951112
gegl_node_connect_from (atopi, "aux", state->saturation, "output");
1113+
gegl_node_connect_from (state->strokebehind, "aux", state->stroke, "output");
1114+
gegl_node_link_many (state->nopstrokebehind, state->stroke, NULL);
1115+
gegl_node_connect_from (state->dsbehind, "aux", state->ds, "output");
1116+
gegl_node_link_many (state->nopdsbehind, state->ds, NULL);
10961117
gegl_node_link_many (state->nopextrassg, state->extrassg, state->extrassgopacity, NULL);
10971118
gegl_node_connect_from (state->behindextrassg, "aux", state->extrassgopacity, "output");
10981119
}
@@ -1113,7 +1134,7 @@ static void attach (GeglOperation *operation)
11131134
{
11141135
GeglNode *gegl = operation->node;
11151136
GeglProperties *o = GEGL_PROPERTIES (operation);
1116-
GeglNode *input, *output, *image, *mbd, *mbdopacity, *nopig, *multiplyb, *nopm, *over, *multiply, *grainextract, *hslcolorig, *overlayig, *softlightig, *screenig, *linearlightig, *multiplyig, *grainmerge, *grainmergeig, *addition, *subtract, *nopb, *mcol, *stroke, *innerglow, *gradient, *crop, *ds, *nopimage, *atopi, *nopg, *atopg, *hslcolorg, *overlayg, *additiong, *softlightg, *screeng, *multiplyg, *hsvhueg, *linearlightg, *grainmergeg, *saturation, *hardlightg, *hardlightig, *burnig, *burng, *lchcolorg, *lchcolorig, *shinygm, *colordodge, *nopb2, *hardlight, *screen, *shiny, *microblur, *thinbold, *opacityinput, *xor, *knockoutidref, *beveloff, *extrassg, *nopextrassg, *behindextrassg, *extrassgopacity, *grainmergeimage, *additionimage, *overlayimage, *multiplyimage, *screenimage, *hslcolorimage, *softlightimage, *linearlightimage, *hardlightimage, *lchcolorimage, *hsvhueimage, *grainmergecolor, *additioncolor, *overlaycolor, *screencolor, *hslcolorcolor, *softlightcolor, *linearlightcolor, *hardlightcolor, *lchcolorcolor, *hsvhuecolor, *nocolor, *solidcolor, *coloropacity, *cropcolor;
1137+
GeglNode *input, *output, *image, *mbd, *mbdopacity, *nopig, *multiplyb, *nopm, *over, *multiply, *grainextract, *hslcolorig, *overlayig, *softlightig, *screenig, *linearlightig, *multiplyig, *grainmerge, *grainmergeig, *addition, *subtract, *nopb, *mcol, *stroke, *innerglow, *gradient, *crop, *ds, *nopimage, *atopi, *nopg, *atopg, *hslcolorg, *overlayg, *additiong, *softlightg, *screeng, *multiplyg, *hsvhueg, *linearlightg, *grainmergeg, *saturation, *hardlightg, *hardlightig, *burnig, *burng, *lchcolorg, *lchcolorig, *shinygm, *colordodge, *nopb2, *hardlight, *screen, *shiny, *microblur, *thinbold, *opacityinput, *xor, *knockoutidref, *beveloff, *extrassg, *nopextrassg, *behindextrassg, *extrassgopacity, *grainmergeimage, *additionimage, *overlayimage, *multiplyimage, *screenimage, *hslcolorimage, *softlightimage, *linearlightimage, *hardlightimage, *lchcolorimage, *hsvhueimage, *grainmergecolor, *additioncolor, *overlaycolor, *screencolor, *hslcolorcolor, *softlightcolor, *linearlightcolor, *hardlightcolor, *lchcolorcolor, *hsvhuecolor, *nocolor, *solidcolor, *coloropacity, *strokebehind, *nopstrokebehind, *nopdsbehind, *dsbehind, *cropcolor;
11171138

11181139
input = gegl_node_get_input_proxy (gegl, "input");
11191140
output = gegl_node_get_output_proxy (gegl, "output");
@@ -1373,6 +1394,23 @@ lchcolorig = gegl_node_new_child (gegl,
13731394
behindextrassg = gegl_node_new_child (gegl,
13741395
"operation", "gimp:layer-mode", "layer-mode", 2, "composite-mode", 0, NULL);
13751396

1397+
dsbehind = gegl_node_new_child (gegl,
1398+
"operation", "gimp:layer-mode", "layer-mode", 2, "composite-mode", 0, NULL);
1399+
1400+
strokebehind = gegl_node_new_child (gegl,
1401+
"operation", "gimp:layer-mode", "layer-mode", 2, "composite-mode", 0, NULL);
1402+
1403+
nopdsbehind = gegl_node_new_child (gegl,
1404+
"operation", "gegl:nop",
1405+
NULL);
1406+
1407+
nopstrokebehind = gegl_node_new_child (gegl,
1408+
"operation", "gegl:nop",
1409+
NULL);
1410+
1411+
1412+
1413+
13761414
extrassg = gegl_node_new_child (gegl,
13771415
"operation", "gegl:zzstrokebevelimage",
13781416
NULL);
@@ -1382,7 +1420,7 @@ behindextrassg = gegl_node_new_child (gegl,
13821420
NULL);
13831421

13841422
extrassgopacity = gegl_node_new_child (gegl,
1385-
"operation", "gegl:opacity",
1423+
"operation", "gegl:nop",
13861424
NULL);
13871425

13881426
/* Blend modes below are alternative blend modes for image file overlay.*/
@@ -1651,8 +1689,12 @@ additioncolor = gegl_node_new_child (gegl,
16511689
state->hsvhuecolor = hsvhuecolor;
16521690
state->nocolor = nocolor;
16531691
state->solidcolor = solidcolor;
1654-
state->coloropacity = coloropacity;
1655-
state->cropcolor = cropcolor;
1692+
state->coloropacity = coloropacity;
1693+
state->cropcolor = cropcolor;
1694+
state->strokebehind = strokebehind;
1695+
state->dsbehind = dsbehind;
1696+
state->nopdsbehind = nopdsbehind;
1697+
state->nopstrokebehind = nopstrokebehind;
16561698
}
16571699

16581700
static void
@@ -1671,7 +1713,7 @@ gegl_op_class_init (GeglOpClass *klass)
16711713
"title", _("GEGL Effects Continual Version"),
16721714
"categories", "Generic",
16731715
"reference-hash", "continual45ed565h8500fca01b2ac",
1674-
"description", _("GEGL text styling and speciality image outlining filter. May 31th 2023 Stable Build"
1716+
"description", _("GEGL text styling and speciality image outlining filter. June 5th 2023 Stable Build"
16751717
""),
16761718
NULL);
16771719
}

0 commit comments

Comments
 (0)