3 local lgi
= require
'lgi'
4 local GObject
= lgi
.GObject
--
8 local graph
= Gegl
.Node()
10 local src
= graph
:create_child("gegl:load")
12 src
:set_property("path", GObject
.Value(GObject
.Type
.STRING
, "data/surfer.png"))
14 local crop
= graph
:create_child('gegl:crop')
15 crop
:set_property("x", GObject
.Value(GObject
.Type
.INT
, 0))
16 crop
:set_property("y", GObject
.Value(GObject
.Type
.INT
, 0))
17 crop
:set_property("width", GObject
.Value(GObject
.Type
.INT
, 300))
18 crop
:set_property("height", GObject
.Value(GObject
.Type
.INT
, 122))
20 local dst
= graph
:create_child("gegl:save")
22 dst
:set_property("path", GObject
.Value(GObject
.Type
.STRING
, "lgi.png"))
24 local text
= graph
:create_child("gegl:text")
25 local white
= Gegl
.Color()
26 white
:set_rgba(1,1,1,1)
27 text
:set_property("string", GObject
.Value(GObject
.Type
.STRING
, "luajit + lgi + GEGL test"))
28 text
:set_property("color", GObject
.Value(GObject
.Type
.OBJECT
, white
))
30 local over
= graph
:create_child("gegl:over")
32 src
:connect_to("output", crop
, "input")
33 crop
:connect_to("output", over
, "input")
34 text
:connect_to("output", over
, "aux")
35 over
:connect_to("output", dst
, "input")