[gegl] vector-fill: use ctx in floating point mode for RGBA
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] vector-fill: use ctx in floating point mode for RGBA
- Date: Thu, 1 Jul 2021 02:43:43 +0000 (UTC)
commit 391f4db981f86d831981946941d74edaa8c03090
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 1 04:43:24 2021 +0200
vector-fill: use ctx in floating point mode for RGBA
operations/external/vector-fill.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/operations/external/vector-fill.c b/operations/external/vector-fill.c
index ad17ebf19..d094f86d8 100644
--- a/operations/external/vector-fill.c
+++ b/operations/external/vector-fill.c
@@ -146,7 +146,7 @@ process (GeglOperation *operation,
}
else
{
- formats[0]=babl_format ("R'G'B'A u8");
+ formats[0]=babl_format ("RGBA float");
}
if (input)
@@ -186,19 +186,11 @@ process (GeglOperation *operation,
{
guchar *data = gegl_buffer_linear_open (output, result, NULL,
formats[i]);
-#if 0
- cairo_surface_t *surface = cairo_image_surface_create_for_data (data,
- CAIRO_FORMAT_ARGB32,
- result->width,
- result->height,
- result->width * 4);
- cairo_t *cr = cairo_create (surface);
-#endif
/* we should work directly with floating point data instead .. but as of now
* that yields an aliased result - so using u8 until that gets resolved.
*/
Ctx *ctx = ctx_new_for_framebuffer (data, result->width, result->height,
- result->width * 4, CTX_FORMAT_RGBA8);
+ result->width * 4 * 4, CTX_FORMAT_RGBAF);
ctx_translate (ctx, -result->x, -result->y);
if (g_str_equal (o->fill_rule, "evenodd"))
@@ -320,6 +312,7 @@ gegl_op_class_init (GeglOpClass *klass)
"title", _("Fill Path"),
"categories", "render:vector",
"reference-hash", "b4bd682b327caa2444c6aa93cd009396",
+ "reference-hashB", "0ab76036217007d53232b39de4bd5cf2",
"description", _("Renders a filled region"),
"reference-composition", composition,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]