app: use gimp_rgba_set,get_pixel() instead of babl_process() directly
This commit is contained in:
@ -2223,9 +2223,7 @@ gimp_context_get_foreground_pixel (GimpContext *context,
|
|||||||
g_return_if_fail (pixel_format != NULL);
|
g_return_if_fail (pixel_format != NULL);
|
||||||
g_return_if_fail (pixel != NULL);
|
g_return_if_fail (pixel != NULL);
|
||||||
|
|
||||||
babl_process (babl_fish (babl_format ("R'G'B'A double"),
|
gimp_rgba_get_pixel (&context->foreground, pixel_format, pixel);
|
||||||
pixel_format),
|
|
||||||
&context->foreground, pixel, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2250,9 +2248,7 @@ gimp_context_set_foreground_pixel (GimpContext *context,
|
|||||||
g_return_if_fail (pixel_format != NULL);
|
g_return_if_fail (pixel_format != NULL);
|
||||||
g_return_if_fail (pixel != NULL);
|
g_return_if_fail (pixel != NULL);
|
||||||
|
|
||||||
babl_process (babl_fish (pixel_format,
|
gimp_rgba_set_pixel (&color, pixel_format, pixel);
|
||||||
babl_format ("R'G'B'A double")),
|
|
||||||
pixel, &color, 1);
|
|
||||||
|
|
||||||
gimp_context_set_foreground (context, &color);
|
gimp_context_set_foreground (context, &color);
|
||||||
}
|
}
|
||||||
@ -2305,9 +2301,7 @@ gimp_context_get_background_pixel (GimpContext *context,
|
|||||||
g_return_if_fail (pixel_format != NULL);
|
g_return_if_fail (pixel_format != NULL);
|
||||||
g_return_if_fail (pixel != NULL);
|
g_return_if_fail (pixel != NULL);
|
||||||
|
|
||||||
babl_process (babl_fish (babl_format ("R'G'B'A double"),
|
gimp_rgba_get_pixel (&context->background, pixel_format, pixel);
|
||||||
pixel_format),
|
|
||||||
&context->background, pixel, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2332,9 +2326,7 @@ gimp_context_set_background_pixel (GimpContext *context,
|
|||||||
g_return_if_fail (pixel_format != NULL);
|
g_return_if_fail (pixel_format != NULL);
|
||||||
g_return_if_fail (pixel != NULL);
|
g_return_if_fail (pixel != NULL);
|
||||||
|
|
||||||
babl_process (babl_fish (pixel_format,
|
gimp_rgba_set_pixel (&color, pixel_format, pixel);
|
||||||
babl_format ("R'G'B'A double")),
|
|
||||||
pixel, &color, 1);
|
|
||||||
|
|
||||||
gimp_context_set_background (context, &color);
|
gimp_context_set_background (context, &color);
|
||||||
}
|
}
|
||||||
|
@ -184,9 +184,7 @@ gimp_pickable_get_color_at (GimpPickable *pickable,
|
|||||||
if (! gimp_pickable_get_pixel_at (pickable, x, y, pixel))
|
if (! gimp_pickable_get_pixel_at (pickable, x, y, pixel))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
babl_process (babl_fish (gimp_pickable_get_format (pickable),
|
gimp_rgba_set_pixel (color, gimp_pickable_get_format (pickable), pixel);
|
||||||
babl_format ("R'G'B'A double")),
|
|
||||||
pixel, color, 1);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user