File: gegl_c2g.lua

package info (click to toggle)
gegl 1%3A0.4.66-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,032 kB
  • sloc: ansic: 241,723; cpp: 4,529; lisp: 3,614; xml: 2,724; python: 1,208; ruby: 1,205; sh: 182; makefile: 35; javascript: 6
file content (16 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local radius = active:get_property("radius").value

touch_point(centerx - dim  - radius, centery)
mrg:listen(Mrg.DRAG, function(ev)
  if ev.type == Mrg.DRAG_MOTION then
    local x = active:get_property("radius").value
    x = x - ev.delta_x
    if x < 0 then x = 0 end
    active:set_property("radius", GObject.Value(GObject.Type.DOUBLE, x))
    ev:stop_propagate();
  end
end)
cr:new_path()

cr:arc(centerx, centery, radius, 0, 3.14152 * 2)
contrasty_stroke()