Re: [Gegl-developer] params of gegl:transform operation

Sorry, I've been busy, and I forgot to reply to this.

Gegl doesn't have any built-in operations for gradients right now, but
you can code your own, either as operations, or that operate on gegl

There are some operations for gradients that are in gegl's source
tree, but they're marked as experimental, and they aren't built by
default. You can build them if you build gegl with --enable-workshop.
Their code is here:

I haven't looked at them closely, so I can't vouch for whether their
code is correct or not, and when operations are maked experimental
like this, there's often something slightly wrong with them. Still,
they might be a good starting point.

On Tue, Oct 8, 2013 at 2:14 AM, beee <gdb_1986 163 com> wrote:
Dear Michael,

Thanks for your kindly help. I have another question: How can I fill a region with gradient color using 

Best Regards.
At 2013-09-29 21:55:00,"Michael Henning" <drawoc darkrefraction com> wrote:
To use gegl:transform, you need to create the transformation matrix
yourself. There are plenty of tutorials for learning how to create
transformation matrices online.

Then, do this to set the node's property:

1. When you create your matrix, place it in a GeglMatrix3 struct. It
contains one member named coeff, which is a 3x3 array of doubles for
the matrix values.
2. Turn the matrix into a string with gchar* gegl_matrix3_to_string
(GeglMatrix3 *matrix);
3. Set this string as the property "transform" on your gegl:transform
node with gegl_node_set.
4. Free the string from (2) with g_free

Anyway, I hope this helps! Feel free to ask if you have any issues.

 -- drawoc

On Sun, Sep 29, 2013 at 6:06 AM, beee <gdb_1986 163 com> wrote:

I want to apply perspective effects on an image. But I can't find an
operation for it. I thought maybe I can do it with gegl:transform. But I
don't know which parameters should use.

Please help. Thanks!


gegl-developer-list mailing list
List address:    gegl-developer-list gnome org
List membership:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]