app: gimp_pickable_contiguous_region_by_line_art() now uses GeglColor.
This commit is contained in:
parent
3ec13730c5
commit
0239d05409
3 changed files with 10 additions and 10 deletions
|
|
@ -370,7 +370,7 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable *drawable,
|
|||
GeglBuffer *new_mask;
|
||||
GeglBuffer *rendered_mask;
|
||||
GeglBuffer *fill_buffer = NULL;
|
||||
GimpRGB fill_color;
|
||||
GeglColor *fill_color = NULL;
|
||||
gint fill_offset_x = 0;
|
||||
gint fill_offset_y = 0;
|
||||
gint x, y, width, height;
|
||||
|
|
@ -410,7 +410,6 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable *drawable,
|
|||
if (fill_color_as_line_art)
|
||||
{
|
||||
GimpPickable *pickable = gimp_line_art_get_input (line_art);
|
||||
GeglColor *color = NULL;
|
||||
|
||||
/* This cannot be a pattern fill. */
|
||||
g_return_val_if_fail (gimp_fill_options_get_style (options) != GIMP_FILL_STYLE_PATTERN,
|
||||
|
|
@ -419,12 +418,11 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable *drawable,
|
|||
g_return_val_if_fail (GIMP_IS_DRAWABLE (pickable), NULL);
|
||||
|
||||
if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_FG_COLOR)
|
||||
color = gimp_context_get_foreground (GIMP_CONTEXT (options));
|
||||
fill_color = gimp_context_get_foreground (GIMP_CONTEXT (options));
|
||||
else if (gimp_fill_options_get_style (options) == GIMP_FILL_STYLE_BG_COLOR)
|
||||
color = gimp_context_get_background (GIMP_CONTEXT (options));
|
||||
fill_color = gimp_context_get_background (GIMP_CONTEXT (options));
|
||||
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
gegl_color_get_rgba_with_space (color, &fill_color.r, &fill_color.g, &fill_color.b, &fill_color.a, NULL);
|
||||
g_return_val_if_fail (fill_color != NULL, NULL);
|
||||
|
||||
fill_buffer = gimp_drawable_get_buffer (drawable);
|
||||
fill_offset_x = gimp_item_get_offset_x (GIMP_ITEM (drawable)) -
|
||||
|
|
@ -434,7 +432,7 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable *drawable,
|
|||
}
|
||||
new_mask = gimp_pickable_contiguous_region_by_line_art (NULL, line_art,
|
||||
fill_buffer,
|
||||
&fill_color,
|
||||
fill_color,
|
||||
fill_color_threshold,
|
||||
fill_offset_x,
|
||||
fill_offset_y,
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ GeglBuffer *
|
|||
gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
|
||||
GimpLineArt *line_art,
|
||||
GeglBuffer *fill_buffer,
|
||||
const GimpRGB *fill_color,
|
||||
GeglColor *fill_color,
|
||||
gfloat fill_threshold,
|
||||
gint fill_offset_x,
|
||||
gint fill_offset_y,
|
||||
|
|
@ -337,7 +337,9 @@ gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
|
|||
fill_format = choose_format (fill_buffer,
|
||||
GIMP_SELECT_CRITERION_COMPOSITE,
|
||||
&n_components, &has_alpha);
|
||||
gimp_rgba_get_pixel (fill_color, fill_format, fill_col);
|
||||
fill_format = babl_format_with_space (babl_format_get_encoding (fill_format),
|
||||
gegl_buffer_get_format (fill_buffer));
|
||||
gegl_color_get_pixel (fill_color, fill_format, fill_col);
|
||||
|
||||
src_buffer = gimp_gegl_buffer_dup (src_buffer);
|
||||
gi = gegl_buffer_iterator_new (src_buffer, NULL, 0, NULL,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ GeglBuffer * gimp_pickable_contiguous_region_by_color (GimpPickabl
|
|||
GeglBuffer * gimp_pickable_contiguous_region_by_line_art (GimpPickable *pickable,
|
||||
GimpLineArt *line_art,
|
||||
GeglBuffer *fill_buffer,
|
||||
const GimpRGB *fill_color,
|
||||
GeglColor *fill_color,
|
||||
gfloat fill_threshold,
|
||||
gint fill_offset_x,
|
||||
gint fill_offset_y,
|
||||
|
|
|
|||
Loading…
Reference in a new issue