Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdlua graphics #35

Merged
merged 65 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
0e2c0ff
Initial commit for pdlua graphics
timothyschoen Dec 20, 2023
1a5d958
Small cleanup
timothyschoen Dec 20, 2023
9967a96
Implement mouse interaction for pd-vanilla, also clip bounds before d…
timothyschoen Dec 20, 2023
bc62c06
Revert mistake
timothyschoen Dec 20, 2023
d69208f
Better way to enable GUI mode, improved pd-vanilla support, improved …
timothyschoen Dec 20, 2023
9ade045
Fixed text drawing for non-gui objects
timothyschoen Dec 20, 2023
38d843a
Fixed text drawing for pd, implement size management, small API and i…
timothyschoen Dec 20, 2023
3e274eb
Added new file
timothyschoen Dec 20, 2023
918f235
Better interface for bezier curves
timothyschoen Dec 21, 2023
ef21ce9
Fixed potential heap overflow when sending path data to pd
timothyschoen Dec 21, 2023
6a8b66d
Improved drawing mechanism for plugdata
timothyschoen Dec 21, 2023
336d301
Remove limit on number of path segments, fixed mouse_move implementat…
timothyschoen Dec 21, 2023
3e0cd72
Simplified mouse event implementation for pd-vanilla
timothyschoen Dec 21, 2023
e08ed6d
Add draw_line function
timothyschoen Dec 21, 2023
32d0344
No limit on number of drawings, fixed missing return statement, fixed…
timothyschoen Dec 21, 2023
c6a05f7
Initialization fixes
timothyschoen Dec 21, 2023
dd6c141
Simplification for plugdata gui registration, fixed repaint bug
timothyschoen Dec 22, 2023
5673a53
Small bugfix
timothyschoen Dec 22, 2023
88bc5dc
Another small bugfix
timothyschoen Dec 22, 2023
03e462c
Mouse event fixes for pd
timothyschoen Dec 22, 2023
65b92b1
pd-vanilla drawing fixes
timothyschoen Dec 22, 2023
a9c3270
Fixed displaying in graphs for pd-vanilla
timothyschoen Dec 22, 2023
1463cf8
pd: Don't clear canvas if nothing was painted
timothyschoen Dec 22, 2023
d2b7ddd
Pd zoom and graph behavior fixes
timothyschoen Dec 22, 2023
1bea6f1
Added a more reliable way to get script path, added _reload method to…
timothyschoen Dec 22, 2023
69aaa85
Fixed all warnings
timothyschoen Dec 22, 2023
8f6ebc4
Make alpha argument really optional, fixed pd zooming issues
timothyschoen Dec 22, 2023
0aa203c
Fix for optional argument
timothyschoen Dec 22, 2023
e72befb
Added GPL license to new files
timothyschoen Dec 22, 2023
543d5f4
Added some comments to explain stuff
timothyschoen Dec 22, 2023
b37efc5
Make sure iolets are also drawn
timothyschoen Dec 22, 2023
29a65de
Cleaned up system for letting plugdata detect which classnames are pd…
timothyschoen Dec 22, 2023
3fe4dd7
Fixed plugdata crash
timothyschoen Dec 22, 2023
eff49f2
Fixed for stroking lines in pd
timothyschoen Dec 22, 2023
19428dd
Added documentation
timothyschoen Dec 22, 2023
cf13e1e
Updated helpfile
timothyschoen Dec 22, 2023
a98b114
Updated pd.lua
timothyschoen Dec 22, 2023
2f9f6d4
Add example file
timothyschoen Dec 23, 2023
8410b57
Example fix
timothyschoen Dec 23, 2023
5446dc0
Added pd multi-instance support
timothyschoen Jan 15, 2024
d2b5462
pd-vanilla bugfixes
timothyschoen Jan 26, 2024
87a08b1
Use lua_threads for multi-instance support
timothyschoen Feb 6, 2024
f60060c
Improved API, simplified multi-instance support
timothyschoen Feb 23, 2024
9e2b478
Merge improved API with pd-vanilla fixes
timothyschoen Feb 23, 2024
19b3955
Updated helpfile
timothyschoen Feb 23, 2024
0e80202
Fixed problem when drawing inside graphs in pd-vanilla
timothyschoen Feb 23, 2024
90c340b
Updated helpfile
timothyschoen Feb 24, 2024
e7d530b
Fixed pd-vanilla drawing bugs, fixed correct ordering in pd-vanilla, …
timothyschoen Feb 24, 2024
9c4a605
Fixed broken dragging for non-gui objects
timothyschoen Feb 26, 2024
206b27d
Implement better affine transform system for pd-vanilla
timothyschoen Feb 26, 2024
03d00ee
Free transform memory after use
timothyschoen Feb 26, 2024
2a62d4e
Fixed some memory issues
timothyschoen Feb 27, 2024
7243dbf
Fixed object moving issues
timothyschoen Feb 27, 2024
d664374
Added signal processing support
timothyschoen Feb 27, 2024
be8983a
Cleaned up
timothyschoen Feb 27, 2024
34395e0
Removed useless comment
timothyschoen Feb 27, 2024
54150ea
Fixed potential crash on shutdown, clean up inlets
timothyschoen Feb 27, 2024
a952360
plugdata compilation fix
timothyschoen Feb 28, 2024
f1dcfde
Call fixlinesfor when resizing
timothyschoen Feb 28, 2024
649863b
Simplifications for plugdata drawing mechanism, fixed iolet position …
timothyschoen Feb 28, 2024
812dadf
Instead of the gui flag, toggle gui/non-gui based on paint() function…
timothyschoen Feb 28, 2024
ff50436
Use ints instead of strings for color presets
timothyschoen Feb 28, 2024
1063cb9
Merge branch 'master' into master
timothyschoen Feb 29, 2024
dfd6f2e
Improved lua multi-instance support
timothyschoen Feb 29, 2024
943d9fb
Merge branch 'master' of https://github.com/timothyschoen/pd-lua
timothyschoen Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions doc/graphics.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
pdlua graphics
===

pdlua's graphics allow you to draw basic vector graphics and receive mouse events on pure-data and plugdata. Drawing functions are prefixed with 'gfx.', and should only be called from within the "paint" function

You can enable GUI mode by setting the self.gui variable in the constructor, like this:

function yourclass:initialize(sel, atoms)
self.inlets = 1
self.gui = 1
return true
end

Painting:
--------------
You can paint by defining the "paint" function, for example:

function yourclass:paint()
gfx.set_color(250, 200, 240)
gfx.fill_all()
end


Mouse Events:
--------------
You can receive mouse events by defining the "mouse_down", "mouse_up", "mouse_move" and "mouse_drag" functions. Both pass the x,y coordinates as arguments. For example:

function yourclass:mouse_down(x, y)
pd.post(tostring(x))
pd.post(tostring(y))
end


API overview
--------------
-- Callback functions you can define
paint() -- Paint callback. This is the only place where you're allowed to call any of the paint functions
pd:Class:mouse_down(x, y) -- Mouse down callback, called when the mouse is clicked
pd:Class:mouse_up(x, y) -- Mouse up callback, called when the mouse button is released
pd:Class:mouse_move(x, y) -- Mouse move callback, called when the mouse is moved while not being down
pd:Class:mouse_drag(x, y) -- Mouse drag callback, called when the mouse is moved while also being down

-- Functions you can call
pd:Class:repaint() -- Request a repaint, after this the "paint" callback will occur

gfx.set_size(w, h) -- Sets the size of the drawing object.

gfx.set_color(r, g, b, a=1.0) -- Sets the color for the next drawing operation.

gfx.fill_ellipse(x, y, w, h) -- Draws a filled ellipse at the specified position and size.
gfx.stroke_ellipse(x, y, w, h, line_width) -- Draws the outline of an ellipse at the specified position and size.

gfx.fill_rect(x, y, w, h) -- Draws a filled rectangle at the specified position and size.
gfx.stroke_rect(x, y, w, h, line_width) -- Draws the outline of a rectangle at the specified position and size.

gfx.fill_rounded_rect(x, y, w, h, corner_radius) -- Draws a filled rounded rectangle at the specified position and size.
gfx.troke_rounded_rect(x, y, w, h, corner_radius, line_width) -- Draws the outline of a rounded rectangle at the specified position and size.

gfx.draw_line(x1, y1, x2, y2) -- Draws a line between two points.
gfx.draw_text(text, x, y, w, fontsize) -- Draws text at the specified position and size.

gfx.start_path(x, y) -- Initiates a new path at the specified point.
gfx.line_to(x, y) -- Adds a line segment to the current path.
gfx.quad_to(x1, y1, x2, y2) -- Adds a quadratic Bezier curve to the current path.
gfx.cubic_to(x1, y1, x2, y2, x3, y) -- Adds a cubic Bezier curve to the current path.
gfx.close_path() -- Closes the current path.
gfx.stroke_path(line_width) -- Draws the outline of the current path with the specified line width.
gfx.fill_path() -- Fills the current path.

gfx.fill_all() -- Fills the entire drawing area with the current color. Also will draw an object outline in the style of the host (ie. pure-data or plugdata)

gfx.translate(tx, ty) -- Translates the coordinate system by the specified amounts.
gfx.scale(sx, sy) -- Scales the coordinate system by the specified factors. This will always happen after the translation
gfx.reset_transform() -- Resets current scale and translation


Basic example
---------------------

-- Create an object named "example"
local example = pd.Class:new():register("example")

function example:initialize(sel, atoms)
self.inlets = 1
self.circle_x = 10
self.circle_y = 10

-- Enabled GUI mode
self.gui = 1
return true
end

-- Receive mouse drag events
function example:mouse_drag(x, y)
-- Set circle position
self.circle_x = x - 15
self.circle_y = y - 15

-- Request a repaint
self:repaint()
end

function example:paint()
-- Fill background with color
gfx.set_color(255, 0, 0, 1)
gfx.fill_all()

-- Draw an ellipse
gfx.set_color(0, 255, 0, 1)
gfx.fill_ellipse(self.circle_x, self.circle_y, 30, 30)
end
93 changes: 92 additions & 1 deletion pd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

-- storage for Pd C<->Lua interaction
pd._classes = { } -- take absolute paths and turn them into classes
pd._fullpaths = { }
pd._pathnames = { } -- look up absolute path by creation name
pd._objects = { }
pd._clocks = { }
pd._receives = { }
pd._loadpath = ""
pd._currentpath = ""

-- add a path to Lua's "require" search paths
pd._setrequirepath = function(path)
Expand Down Expand Up @@ -77,6 +79,47 @@ pd._dispatcher = function (object, inlet, sel, atoms)
end
end

pd._dsp = function (object, samplerate, blocksize)
local obj = pd._objects[object]
if nil ~= obj and type(obj.dsp) == "function" then
pd._objects[object]:dsp(samplerate, blocksize)
end
end

pd._perform_dsp = function (object, ...)
local obj = pd._objects[object]
if nil ~= obj and type(obj.perform) == "function" then
return pd._objects[object]:perform(...)
end
end

-- repaint method dispatcher
pd._repaint = function (object)
local obj = pd._objects[object]
if nil ~= obj and type(obj.repaint) == "function" then
obj:repaint();
end
end

-- mouse event dispatcher
pd._mouseevent = function (object, x, y, event_type)
if nil ~= pd._objects[object] then
local obj = pd._objects[object]
if event_type == 0 and type(obj.mouse_down) == "function" then
obj:mouse_down(x, y)
end
if event_type == 1 and type(obj.mouse_up) == "function" then
obj:mouse_up(x, y)
end
if event_type == 2 and type(obj.mouse_move) == "function" then
obj:mouse_move(x, y)
end
if event_type == 3 and type(obj.mouse_drag) == "function" then
obj:mouse_drag(x, y)
end
end
end

-- clock method dispatcher
pd._clockdispatch = function (c)
if nil ~= pd._clocks[c] then
Expand All @@ -92,6 +135,15 @@ pd._whoami = function (object)
end
end

--whereami method dispatcher
pd._whereami = function(name)
if nil ~= pd._fullpaths[name] then
return pd._fullpaths[name]
end

return nil
end

--class method dispatcher
pd._get_class = function (object)
if nil ~= pd._objects[object] then
Expand Down Expand Up @@ -263,10 +315,19 @@ function pd.Class:register(name)
else
regname = name
end

--pd._fullpaths[regname] = pd._currentpath or (fullname .. ".pd_lua")
if pd._currentpath == nil or pd._currentpath == '' then
pd._fullpaths[regname] = fullname .. ".pd_lua"
else
pd._fullpaths[regname] = pd._currentpath
end

pd._pathnames[regname] = fullname
pd._classes[fullname] = self -- record registration
self._class = pd._register(name) -- register new class
self._name = name
self._path = pd._fullpaths[regname]
self._loadpath = fullpath
if name == "pdlua" then
self._scriptname = "pd.lua"
Expand All @@ -284,6 +345,9 @@ function pd.Class:construct(sel, atoms)
if self:initialize(sel, atoms) then
pd._createinlets(self._object, self.inlets)
pd._createoutlets(self._object, self.outlets)
if type(self.paint) == "function" then
pd._creategui(self._object)
end
self:postinitialize()
return self
else
Expand Down Expand Up @@ -336,6 +400,25 @@ end

function pd.Class:initialize(sel, atoms) end

function pd.Class:repaint()
if type(self.paint) == "function" then
local g = _gfx_internal.gfx_new()
local can_paint = _gfx_internal.start_paint();
if can_paint then
self:paint(g);
_gfx_internal.end_paint();
end
end
end

function pd.Class:get_size()
return _gfx_internal.get_size()
end

function pd.Class:set_size(width, height)
return _gfx_internal.set_size(width, height)
end

function pd.Class:postinitialize() end

function pd.Class:finalize() end
Expand All @@ -348,6 +431,7 @@ function pd.Class:dofilex(file)
local pathsave = pd._loadpath
pd._loadname = nil
pd._loadpath = self._loadpath
pd._currentpath = file
local f, path = pd._dofilex(self._class, file)
pd._loadname = namesave
pd._loadpath = pathsave
Expand All @@ -362,6 +446,7 @@ function pd.Class:dofile(file)
local pathsave = pd._loadpath
pd._loadname = nil
pd._loadpath = self._loadpath
pd._currentpath = file
local f, path = pd._dofile(self._object, file)
pd._loadname = namesave
pd._loadpath = pathsave
Expand All @@ -376,6 +461,10 @@ function pd.Class:whoami()
return self._scriptname or self._name
end

function pd.Class:in_1__reload()
self:dofile(self._path)
end

function pd.Class:get_class() -- accessor for t_class*
return self._class or nil
end
Expand All @@ -392,7 +481,6 @@ function lua:in_1_load(atoms) -- execute a script
self:dofile(atoms[1])
end


local luax = pd.Class:new():register("pdluax") -- classless lua externals (like [pdluax foo])

function luax:initialize(sel, atoms) -- motivation: pd-list 2007-09-23
Expand Down Expand Up @@ -421,4 +509,7 @@ function luax:initialize(sel, atoms) -- motivation: pd-list 2007-09-23
end
end

DATA = 0
SIGNAL = 1
Colors = {background = 0, foreground = 1, outline = 2}
-- fin pd.lua
68 changes: 47 additions & 21 deletions pdlua-help.pd
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
#N canvas 467 36 561 528 10;
#N canvas 466 36 564 576 10;
#X declare -lib pdlua -path pdlua;
#X declare -path pdlua/examples;
#X msg 55 227 load hello.lua;
#X text 16 358 See also:;
#X obj 351 234 hello;
#X obj 55 257 pdlua;
#X obj 81 359 pdluax hello;
#X obj 4 397 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 4 432 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 4 467 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 143 406 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 4 500 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X text 243 442 NONE;
#X text 243 477 NONE;
#X text 177 407 load <symbol>;
#X obj 6 446 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 6 481 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 6 516 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 145 455 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 6 549 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X text 245 491 NONE;
#X text 245 526 NONE;
#X text 179 456 load <symbol>;
#X text 151 226 <-- load and run a Lua file;
#X text 91 257 <-- global interface to pdlua;
#X obj 306 4 cnv 15 250 40 empty empty empty 12 13 0 18 #7c7c7c #e0e4dc 0;
#N canvas 382 141 749 319 (subpatch) 0;
#X coords 0 -1 1 1 252 42 2 100 100;
#X coords 0 -1 1 1 249 39 2 100 100;
#X restore 305 3 pd;
#X obj 315 18 cnv 10 10 10 empty empty Load\ externals\ written\ in\ Lua 0 6 2 20 #7c7c7c #e0e4dc 0;
#X obj 3 3 cnv 15 301 42 empty empty pdlua 20 20 2 37 #e0e0e0 #000000 0;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 302 42 1 0 0;
#X coords 0 1 100 -1 299 39 1 0 0;
#X restore 3 3 graph;
#X text 390 233 <- right click for help or open, f 16;
#X text 22 60 [pdlua] registers a loader that allows Pd externals written in Lua (with the "*.pd_lua" extension) to be loaded. To guarantee Pd will load these externals \, you should load [pdlua] as a library \, either at startup or with [delcare]:, f 80;
#X text 75 114 loading [pdlua] from [declare] -->;
#X text 261 407 - load and run a '*.lua' file;
#X text 334 346 Details on writting lua externals ----->, f 23;
#X text 263 456 - load and run a '*.lua' file;
#X text 324 344 Details on writting lua externals ----->, f 23;
#X text 23 291 The [hello] object above is loaded from a 'hello.pd_lua' file. You can also provide help files for it and right click on it to ask for them. Right click also allows you to open the .pd_lua file if your system has a known application for it., f 80;
#X text 164 353 (this version loads files as arguments), f 20;
#X obj 290 115 declare -lib pdlua -path pdlua;
Expand Down Expand Up @@ -152,16 +150,16 @@
#X obj 46 2226 cnv 17 450 20 empty empty empty 20 12 0 14 #cccccc #404040 0;
#X text 71 2229 (modified from doc/examples/pdlua/lua.txt by mrpeach 2011/10/06), f 64;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 167 101 1;
#X coords 0 1 100 -1 167 101 1 0 0;
#X restore 497 1661 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 167 120 1;
#X coords 0 1 100 -1 167 120 1 0 0;
#X restore 497 1762 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 167 121 1;
#X coords 0 1 100 -1 167 121 1 0 0;
#X restore 497 1882 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X coords 0 1 100 -1 451 2163 1;
#X coords 0 1 100 -1 451 2163 1 0 0;
#X restore 46 82 graph;
#X text 69 21 Find basic instructions/examples below on how to write externals in Lua. For a detailed tutorial \, check the 'pdlua/tutorial' folder for a PDF documente. You can also find this tutorial online at: https://agraef.github.io/pd-lua/tutorial/pd-lua-intro.html, f 66;
#X obj 515 1624 declare -path pdlua/examples;
Expand All @@ -175,5 +173,33 @@
#X connect 110 0 65 0;
#X connect 111 0 65 0;
#X connect 112 0 67 0;
#X restore 438 364 pd quickstart;
#X connect 0 0 3 0;
#X restore 446 359 pd quickstart;
#N canvas 21 133 772 759 graphics 0;
#X obj 8 77 hello-gui;
#X text 8 323 You can enable GUI mode by setting the self.gui variable in the constructor \, like this:;
#X text 8 366 function yourclass:initialize(sel \, atoms);
#X text 25 383 self.gui = 1;
#X text 24 415 return true;
#X text 7 433 end;
#X text 8 457 -------------- Painting: --------------;
#X text 8 480 You can paint by defining the "paint" function \, for example:;
#X text 8 561 end;
#X text 8 604 -------------- Mouse Events: --------------;
#X text 8 633 You can receive mouse events by defining the "mouse_down" \, "mouse_up" \, "mouse_move" and "mouse_drag" functions. Both pass the x \, y coordinates as arguments. For example:;
#X text 8 743 end;
#X text 8 691 function yourclass:mouse_down(x \, y);
#X text 25 708 pd.post(tostring(x));
#X text 25 725 pd.post(tostring(y));
#X text 8 788 -------------- API: --------------;
#X text 8 509 function yourclass:paint(g);
#X text 25 526 g.set_color(250 \, 200 \, 240);
#X text 25 543 g.fill_all();
#X text 23 400 self.set_size(100 \, 100);
#X text 8 11 pdlua's graphics allow you to draw basic vector graphics and receive mouse events on pure-data and plugdata. Drawing functions need to be called on the graphics context class \, which is passed into the paint() function as the first argument., f 72;
#X text 8 816 pd:Class:repaint() \; \; pd:Class:mouse_down(x \, y) \; pd:Class:mouse_up(x \, y) \; pd:Class:mouse_move(x \, y) \; pd:Class:mouse_drag(x \, y) \; \; \; pd:Class:paint(g) \; \; g.set_size(w \, h) \; g.set_color(r \, g \, b \, a=1.0) \; \; g.fill_ellipse(x \, y \, w \, h) \; g.stroke_ellipse(x \, y \, w \, h \, line_width) \; g.fill_rect(x \, y \, w \, h) \; g.stroke_rect(x \, y \, w \, h \, line_width) \; g.fill_rounded_rect(x \, y \, w \, h \, corner_radius) \; g.stroke_rounded_rect(x \, y \, w \, h \, corner_radius \, line_width) \; \; g.draw_line(x1 \, y1 \, x2 \, y2) \; g.draw_text(text \, x \, y \, w \, fontsize) \; \; g.start_path(x \, y) \; g.line_to(x \, y) \; g.quad_to(x1 \, y1 \, x2 \, y2) \; g.cubic_to(x1 \, y1 \, x2 \, y2 \, x3 \, y) \; g.close_path() \; g.stroke_path(line_width) \; g.fill_path() \; \; g.fill_all() \; \; g.translate(tx \, ty) \; g.scale(sx \, sy) \; g.reset_transform() \;, f 58;
#X text 353 816 -- Request a repaint \, after this the "paint" callback will occur \; \; -- Mouse down callback \, called when the mouse is clicked \; -- Mouse up callback \, called when the mouse button is released \; -- Mouse move callback \, called when the mouse is moved while not being down \; -- Mouse drag callback \, called when the mouse is moved while also being down \; \; \; \; -- Paint callback The argument "g" is the graphics context that you can call these drawing functions on: -- Sets the size of the drawing object. \; -- Sets the color for the next drawing operation. \; \; -- Draws a filled ellipse at the specified position and size. \; -- Draws the outline of an ellipse at the specified position and size. \; -- Draws a filled rectangle at the specified position and size. \; -- Draws the outline of a rectangle at the specified position and size. \; -- Draws a filled rounded rectangle at the specified position and size. \; -- Draws the outline of a rounded rectangle at the specified position and size. \; \; -- Draws a line between two points. \; -- Draws text at the specified position and size. \; \; -- Initiates a new path at the specified point. \; -- Adds a line segment to the current path. \; -- Adds a quadratic Bezier curve to the current path. \; -- Adds a cubic Bezier curve to the current path. \; -- Closes the current path. \; -- Draws the outline of the current path with the specified line width. \; -- Fills the current path. \; \; -- Fills the entire drawing area with the current color. Also will draw an object outline in the style of the host (ie. pure-data or plugdata) \; \; -- Translates the coordinate system by the specified amounts. \; -- Scales the coordinate system by the specified factors. This will always happen after the translation \; -- Resets current scale and translation \;, f 134;
#X restore 446 409 pd graphics;
#X text 324 384 Details on how to create GUI objects ------->, f 18;
#X obj 342 227 hello;
#X msg 55 227 load hello-gui.pd_lua;
#X connect 31 0 1 0;
Loading
Loading