@@ -77,23 +77,25 @@ enum_end (GeglSinusgloss)
7777
7878
7979enum_start (gegl_blend_mode_typeshineg )
80+ enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGEALT , "GrainMergeAlt ",
81+ N_ ("GrainMergeAlt "))
8082 enum_value (GEGL_BLEND_MODE_TYPE_GRAINMERGE , "GrainMerge ",
8183 N_ ("GrainMerge "))
8284 enum_value (GEGL_BLEND_MODE_TYPE_HARDLIGHT , "Hardlight ",
8385 N_ ("Hardlight "))
8486 enum_value (GEGL_BLEND_MODE_TYPE_ADDITION , "Addition ",
8587 N_ ("Addition "))
8688 enum_value (GEGL_BLEND_MODE_TYPE_REPLACE , "Replace ",
87- N_ ("Replace "))
89+ N_ ("Multiply "))
8890enum_end (GeglBlendModeTypeshineg )
8991
9092property_enum (blendmode , _ ("Blend Mode of Shine "),
9193 GeglBlendModeTypeshineg , gegl_blend_mode_typeshineg ,
9294 GEGL_BLEND_MODE_TYPE_REPLACE )
9395
94- property_boolean (enable , _ ("Disable Shine for GEGL Effects" ), FALSE)
96+ property_boolean (enable , _ ("Enable Shine for GEGL Effects" ), FALSE)
9597 description (_ ("This option is only for GEGL Effects" ))
96- ui_meta ( "role" , "output-extent" )
98+
9799
98100
99101
@@ -138,13 +140,16 @@ typedef struct
138140{
139141 GeglNode * input ;
140142 GeglNode * opacity ;
143+ GeglNode * crop ;
144+ GeglNode * crop2 ;
141145 GeglNode * nop0 ;
142146 GeglNode * nop ;
143147 GeglNode * blend ;
144148 GeglNode * sinus ;
145149 GeglNode * addition ;
146150 GeglNode * hardlight ;
147151 GeglNode * grainmerge ;
152+ GeglNode * grainmergealt ;
148153 GeglNode * replace ;
149154 GeglNode * output ;
150155}State ;
@@ -158,6 +163,7 @@ update_graph (GeglOperation *operation)
158163
159164 GeglNode * blendchoice = state -> replace ; /* the default */
160165 switch (o -> blendmode ) {
166+ case GEGL_BLEND_MODE_TYPE_GRAINMERGEALT : blendchoice = state -> grainmergealt ; break ;
161167 case GEGL_BLEND_MODE_TYPE_GRAINMERGE : blendchoice = state -> grainmerge ; break ;
162168 case GEGL_BLEND_MODE_TYPE_HARDLIGHT : blendchoice = state -> hardlight ; break ;
163169 case GEGL_BLEND_MODE_TYPE_ADDITION : blendchoice = state -> addition ; break ;
@@ -167,9 +173,9 @@ default: blendchoice = state->replace;
167173}
168174 if (o -> enable )
169175 {
170- gegl_node_link_many (state -> input , blendchoice , state -> output , NULL );
171- gegl_node_link_many (state -> sinus , state -> opacity , NULL );
172- gegl_node_connect_from (blendchoice , "aux" , state -> opacity , "output" );
176+ gegl_node_link_many (state -> input , blendchoice , state -> crop2 , state -> output , NULL );
177+ gegl_node_link_many (state -> sinus , state -> opacity , state -> crop , NULL );
178+ gegl_node_connect_from (blendchoice , "aux" , state -> crop , "output" );
173179 }
174180else
175181 gegl_node_link_many (state -> input , state -> output , NULL );
@@ -180,7 +186,7 @@ static void attach (GeglOperation *operation)
180186{
181187GeglProperties * o = GEGL_PROPERTIES (operation );
182188 GeglNode * gegl = operation -> node ;
183- GeglNode * input , * output , * sinus , * replace , * addition , * grainmerge , * blend , * nop0 , * nop , * hardlight , * opacity ;
189+ GeglNode * input , * output , * sinus , * replace , * addition , * crop , * crop2 , * grainmerge , * grainmergealt , * blend , * nop0 , * nop , * hardlight , * opacity ;
184190
185191
186192 input = gegl_node_get_input_proxy (gegl , "input" );
@@ -200,14 +206,21 @@ GeglProperties *o = GEGL_PROPERTIES (operation);
200206 "operation" , "gegl:nop" ,
201207 NULL );
202208
209+ crop = gegl_node_new_child (gegl ,
210+ "operation" , "gegl:crop" ,
211+ NULL );
212+
213+ crop2 = gegl_node_new_child (gegl ,
214+ "operation" , "gegl:crop" ,
215+ NULL );
216+
203217 nop0 = gegl_node_new_child (gegl ,
204218 "operation" , "gegl:nop" ,
205219 NULL );
206220
207221
208- replace = gegl_node_new_child (gegl ,
209- "operation" , "gegl:src-atop" ,
210- NULL );
222+ replace = gegl_node_new_child (gegl ,
223+ "operation" , "gimp:layer-mode" , "layer-mode" , 30 , "composite-space" , 2 , "composite-mode" , 0 , "blend-space" , 2 , NULL );
211224
212225hardlight = gegl_node_new_child (gegl ,
213226 "operation" , "gimp:layer-mode" , "layer-mode" , 44 , "composite-mode" , 0 , "blend-space" , 0 , NULL );
@@ -219,6 +232,10 @@ addition = gegl_node_new_child (gegl,
219232grainmerge = gegl_node_new_child (gegl ,
220233 "operation" , "gimp:layer-mode" , "layer-mode" , 47 , "composite-mode" , 0 , NULL );
221234
235+ grainmergealt = gegl_node_new_child (gegl ,
236+ "operation" , "gimp:layer-mode" , "layer-mode" , 47 , "composite-space" , 2 , "composite-mode" , 0 , "blend-space" , 2 , NULL );
237+
238+
222239
223240
224241 blend = gegl_node_new_child (gegl ,
@@ -248,10 +265,13 @@ grainmerge = gegl_node_new_child (gegl,
248265 state -> addition = addition ;
249266 state -> hardlight = hardlight ;
250267 state -> grainmerge = grainmerge ;
268+ state -> grainmergealt = grainmergealt ;
251269 state -> replace = replace ;
252270 state -> sinus = sinus ;
253271 state -> nop = nop ;
254272 state -> nop = nop0 ;
273+ state -> crop = crop ;
274+ state -> crop2 = crop2 ;
255275 state -> blend = blend ;
256276 state -> output = output ;
257277
0 commit comments