Skip to content
Merged
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions pdlua-help.pd
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
#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 633 You can receive mouse events by defining the "mouse_down" \, "mouse_up" \, "mouse_move" \, "mouse_drag" \, "mouse_enter" and "mouse_exit" functions. Each passes 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));
Expand All @@ -193,8 +193,8 @@
#X text 8 323 Graphics mode is enabled automatically by defining the paint method \, see below. You can also set the size in the constructor (or in any other function) \, like this:;
#X text 23 394 self:set_size(100 \, 100);
#X text 814 1537  ;
#X text 416 804 \; -- 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 \; \; \; \; -- Request a repaint for specified layer (or all layers if no parameter is set or if layer is 0). after this \, the "paint" or "paint_layer_n" callback will occur \; \; -- Paint callback \, passes a graphics context object (commonly called g) for main layer or layer n (n > 1) that you can call these drawing functions on: \; \; -- Sets the size of the object \; -- Gets the size of the 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. fontsize defaults to pd's default font size. Alignment must be one of: TOP_LEFT/TOP_CENTER/TOP_RIGHT/CENTER_LEFT/CENTER/CENTER_RIGHT/BOTTOM_LEFT/BOTTOM_CENTER/BOTTOM_RIGHT \; -- 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 \; \; -- Initiates a new path at the specified point \; -- Adds a line segment to the path \; -- Adds a quadratic Bezier curve to the path \; -- Adds a cubic Bezier curve to the path \; -- Closes the path \; \; -- Draws the outline of the path with the specified line width \; -- Fills the current path \; \; -- Draws an svg vector image from a svg text \; -- Draws an image found inside search paths (supports JPEG \, PNG \, BMP \, GIF \, PSD \, HDR \, PIC) \; \; \; -- Called when DSP is activated and whenever the DSP graph is updated \; -- Called for every audio block \, passing tables of samples per inlet and expecting tables of samples per outlet \; \; -- Used in dsp function to achieve multichannel output for specific outlets \; \; \; \; -- Expand dollar symbols in patch canvas context \; -- Set the object arguments to be saved in the patch file \; -- Get the object arguments \;, f 113;
#X text 8 816 -- Callback functions you can define \; pd:Class:mouse_down(x \, y) \; pd:Class:mouse_up(x \, y) \; pd:Class:mouse_move(x \, y) \; pd:Class:mouse_drag(x \, y) \; \; \; -- Functions you can call \; pd:Class:repaint(layer) \; \; \; pd:Class:paint(g) / pd:Class:paint_layer_n(g) \; \; \; g:set_size(w \, h) \; width \, height = g:get_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=1) \; \; g:fill_rect(x \, y \, w \, h) \; g:stroke_rect(x \, y \, w \, h \, line_width=1) \; \; g:fill_rounded_rect(x \, y \, w \, h \, corner_radius) \; g:stroke_rounded_rect(x \, y \, w \, h \, corner_radius \, line_width=1) \; \; g:draw_line(x1 \, y1 \, x2 \, y2\\\, line_width=1) \; g:draw_text(text \, x \, y \, w \, fontsize=default \, alignment=TOP_LEFT) \; \; g:fill_all() \; \; g:translate(tx \, ty) \; g:scale(sx \, sy) \; g:reset_transform() \; \; p = Path(x \, y) \; p:line_to(x \, y) \; p:quad_to(x1 \, y1 \, x2 \, y2) \; p:cubic_to(x1 \, y1 \, x2 \, y2 \, x3 \, y) \; p:close() \; \; g:stroke_path(p \, line_width=1) \; g:fill_path(p) \; \; g:draw_svg(svg_text \, x \, y) \; g:draw_image(image_path \, x \, y) \; \; -- Audio callbacks \; pd:Class:dsp(samplerate \, blocksize \, channel_counts) \; pd:Class:perform(in1 \, in2 \, ... \, in_n) \; \; pd:Class:signal_setmultiout(outlet \, channel_count) \; \; \; -- Additional functions \; expandedsymbol = pd:Class:canvas_realizedollar(s) \; pd:Class:set_args(args) \; args = pd:Class:get_args() \;, f 66;
#X text 405 816 \; -- 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 \; -- Mouse enter callback \, called when the pointer enters the object \; -- Mouse exit callback \, called when the pointer leaves the object \; \; \; \; -- Request a repaint for specified layer (or all layers if no parameter is set or if layer is 0). after this \, the "paint" or "paint_layer_n" callback will occur \; \; -- Paint callback \, passes a graphics context object (commonly called g) for main layer or layer n (n > 1) that you can call these drawing functions on: \; \; -- Sets the size of the object \; -- Gets the size of the 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. fontsize defaults to pd's default font size. Alignment must be one of: TOP_LEFT/TOP_CENTER/TOP_RIGHT/CENTER_LEFT/CENTER/CENTER_RIGHT/BOTTOM_LEFT/BOTTOM_CENTER/BOTTOM_RIGHT \; \; -- 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 \; \; -- Initiates a new path at the specified point \; -- Adds a line segment to the path \; -- Adds a quadratic Bezier curve to the path \; -- Adds a cubic Bezier curve to the path \; -- Closes the path \; \; -- Draws the outline of the path with the specified line width \; -- Fills the current path \; \; -- Draws an svg vector image from a svg text \; -- Draws an image found inside search paths (supports JPEG \, PNG \, BMP \, GIF \, PSD \, HDR \, PIC) \; \; \; -- Called when DSP is activated and whenever the DSP graph is updated \; -- Called for every audio block \, passing tables of samples per inlet and expecting tables of samples per outlet \; \; -- Used in dsp function to achieve multichannel output for specific outlets \; \; \; \; -- Expand dollar symbols in patch canvas context \; -- Set the object arguments to be saved in the patch file \; -- Get the object arguments \;, f 113;
#X text 8 816 -- Callback functions you can define \; 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:mouse_enter(x \, y) \; pd:Class:mouse_exit(x \, y) \; \; \; -- Functions you can call \; pd:Class:repaint(layer) \; \; \; pd:Class:paint(g) / pd:Class:paint_layer_n(g) \; \; \; g:set_size(w \, h) \; width \, height = g:get_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=1) \; \; g:fill_rect(x \, y \, w \, h) \; g:stroke_rect(x \, y \, w \, h \, line_width=1) \; \; g:fill_rounded_rect(x \, y \, w \, h \, corner_radius) \; g:stroke_rounded_rect(x \, y \, w \, h \, corner_radius \, line_width=1) \; \; g:draw_line(x1 \, y1 \, x2 \, y2\\\, line_width=1) \; g:draw_text(text \, x \, y \, w \, fontsize=default \, alignment=TOP_LEFT) \; \; \; g:fill_all() \; \; \; g:translate(tx \, ty) \; g:scale(sx \, sy) \; g:reset_transform() \; \; p = Path(x \, y) \; p:line_to(x \, y) \; p:quad_to(x1 \, y1 \, x2 \, y2) \; p:cubic_to(x1 \, y1 \, x2 \, y2 \, x3 \, y) \; p:close() \; \; g:stroke_path(p \, line_width=1) \; g:fill_path(p) \; \; g:draw_svg(svg_text \, x \, y) \; g:draw_image(image_path \, x \, y) \; \; -- Audio callbacks \; pd:Class:dsp(samplerate \, blocksize \, channel_counts) \; pd:Class:perform(in1 \, in2 \, ... \, in_n) \; \; pd:Class:signal_setmultiout(outlet \, channel_count) \; \; \; -- Additional functions \; expandedsymbol = pd:Class:canvas_realizedollar(s) \; pd:Class:set_args(args) \; args = pd:Class:get_args() \;, f 66;
#X restore 446 409 pd graphics;
#X text 324 384 Details on how to create GUI objects ------->, f 18;
#X obj 342 247 hello;
Expand Down