PureData CEAMMC library web documentation
aliases: [ui.cnv]
available since version: 0.9.7
Canvas drawing methods are close to Cairo graphic library Basic drawing workflow is: - create line, shape or text - stroke or fill it with color - update image
X left-coord in pixel or percents of width
type: atom
required: True
Y top-coord in pixel or percents of height
type: atom
required: True
MUSIC ABC notation
type: list
required: True
XC x-center coord in pixel or percents of width
type: atom
required: True
YC y-center coord in pixel or percents of height
type: atom
required: True
RC radius in pixel or percents of width
type: atom
required: True
A0 start angle in degrees or radians
type: atom
required: True
A1 end angle in degrees or radians
type: atom
required: True
X0 x-coord of start point in pixel or percents of width
type: atom
required: True
Y0 y-coord of start point in pixel or percents of height
type: atom
required: True
X1 x-coord of target point in pixel or percents of width
type: atom
required: True
Y1 y-coord of target point in pixel or percents of height
type: atom
required: True
[START] start shape
type: symbol
[END] end shape
type: symbol
X x-coord
type: float
required: True
Y y-coord
type: float
required: True
RADIUS radius
type: float
required: True
clear
clear image
close_path
close path and its subpaths
crestore
restore previously saved context (pen type, width, color, matrix etc.)
csave
save current drawing context (pen type, width, color, matrix etc.)
X0 x0-coord in pixels or percents of width
type: atom
required: True
Y0 y0-coord in pixels or percents of height
type: atom
required: True
X1 x1-coord in pixels or percents of width
type: atom
required: True
Y1 y1-coord in pixels or percents of height
type: atom
required: True
X2 x2-coord in pixels or percents of width
type: atom
required: True
Y2 y2-coord in pixels or percents of height
type: atom
required: True
X3 x3-coord in pixels or percents of width
type: atom
required: True
Y4 y3-coord in pixels or percents of height
type: atom
required: True
dump
dumps all object info to Pd console window.
X left-coord in pixel or percents of width
type: atom
required: True
Y top-coord in pixel or percents of height
type: atom
required: True
WIDTH width
type: atom
required: True
HEIGHT height
type: atom
required: True
COLOR fill color
type: atom
required: True
[PRESERVE] preserve path after fill. You can call stroke method after that
type: atom
FONT font family
type: symbol
required: True
[SIZE] font size
type: float
X left-coord in pixel or percents of width
type: atom
required: True
Y top-coord in pixel or percents of height
type: atom
required: True
SIZE font size
type: float
required: True
ICON icon name. See https://fonts.google.com/icons for full list
type: symbol
required: True
X left-coord in pixel or percents of width
type: atom
required: True
Y top-coord in pixel or percents of height
type: atom
required: True
PATH path to image file, full or relative to patch
type: symbol
required: True
[SCALE] image scale
type: float
X0 x0-coord in pixels or percents of width
type: atom
required: True
Y0 y0-coord in pixels or percents of height
type: atom
required: True
X1 x1-coord in pixels or percents of width
type: atom
required: True
Y1 y1-coord in pixels or percents of height
type: atom
required: True
X x-coord in pixels or percents of width
type: atom
required: True
Y y-coord in pixels or percents of height
type: atom
required: True
X x relative offset in pixels or percents of width
type: atom
required: True
Y y relative offset in pixels or percents of height
type: atom
required: True
X x-coord in pixels or percents of width
type: atom
required: True
Y y-coord in pixels or percents of height
type: atom
required: True
XX xx component of the affine transformation
type: atom
required: True
YX yx component of the affine transformation
type: atom
required: True
XY xy component of the affine transformation
type: atom
required: True
YY yy component of the affine transformation
type: atom
required: True
X0 x component of the affine transformation
type: atom
required: True
Y0 y component of the affine transformation
type: atom
required: True
X x-coord in pixels or percents of width
type: atom
required: True
Y y-coord in pixels or percents of height
type: atom
required: True
FILE absolute or relative to patch filepath of MusicXML file
type: symbol
required: True
new_path
starts new path
new_subpath
starts new subpath, means no line connection between last point and new subpath
shape
X x-coord of center in pixel or percents of width
type: atom
required: True
Y y-coord of center in pixel or percents of height
type: atom
required: True
[ADIV] number of divisions of 90 degree angle
type: int
[NC] number of circles
type: int
[CDIST] circle distance
type: int
X0 x0-coord in pixel or percents of width
type: atom
required: True
Y0 y0-coord in pixel or percents of height
type: atom
required: True
X… x…-coord in pixel or percents of width
type: atom
required: True
Y… y…-coord in pixel or percents of height
type: atom
required: True
XN xn-coord in pixel or percents of width
type: atom
required: True
YN yn-coord in pixel or percents of height
type: atom
required: True
X top left x-coord
type: float
required: True
Y top right y-coord
type: float
required: True
X left-coord in pixel or percents of width
type: atom
required: True
Y top-coord in pixel or percents of height
type: atom
required: True
PIXEL pixel size
type: int
required: True
TEXT message
type: symbol
required: True
X x-coord in pixels or percents of width
type: atom
required: True
Y y-coord in pixels or percents of height
type: atom
required: True
W width in pixels or percents of width
type: atom
required: True
H height in pixels or percents of height
type: atom
required: True
X x-coord of center in pixel or percents of width
type: atom
required: True
Y y-coord of center in pixel or percents of height
type: atom
required: True
N number of vertexes
type: int
required: True
R polygon radius
type: float
required: True
X x
type: float
required: True
[Y] y. If omitted, uses X-value to scale same in both directions
type: float
X x-coord of center in pixel or percents of width
type: atom
required: True
Y y-coord of center in pixel or percents of height
type: atom
required: True
N number of vertexes
type: int
required: True
[R] star radius
type: float
[STEP] connection step. If omitted step is auto-calculated
type: int
COLOR stroke color
type: atom
required: True
[PRESERVE] preserve path after stroke
type: atom
X x-coord in pixels or percents of width
type: atom
required: True
Y y-coord in pixels or percents of height
type: atom
required: True
TXT text content
type: list
required: True
X x offset
type: float
required: True
Y y offset
type: float
required: True
@send
Get/set send destination
type: symbol
default: (null)
@receive
Get/set receive source
type: symbol
default: (null)
@size
Get/set element size (width, height pair)
type: list
default: 120 60
@pinned
Get/set pin mode. if 1 - put element to the lowest level
type: bool
default: 0
@background_color
Get/set element background color (list of red, green, blue values in 0-1 range)
type: list
default: 0.93 0.93 0.93 1
@border_color
Get/set border color (list of red, green, blue values in 0-1 range)
type: list
default: 0.6 0.6 0.6 1
@fontsize
Get/set fontsize
type: int
range: 4..100
default: 11
@fontname
Get/set fontname
type: symbol
enum: Courier, DejaVu, Helvetica, Monaco, Times
default: Helvetica
@fontweight
Get/set font weight
type: symbol
enum: normal, bold
default: normal
@fontslant
Get/set font slant
type: symbol
enum: roman, italic
default: roman
@label
Get/set label text
type: symbol
default: (null)
@label_color
Get/set label color in RGB format within 0-1 range, for example: 0.2 0.4 0.1
type: list
default: 0 0 0 1
@label_inner
Get/set label position (1 - inner, 0 - outer).
type: bool
default: 0
@label_align
Get/set label horizontal align
type: symbol
enum: left, center, right
default: left
@label_valign
Get/set label vertical align
type: symbol
enum: top, center, bottom
default: top
@label_side
Get/set label snap side
type: symbol
enum: left, top, right, bottom
default: top
@label_margins
Get/set label offset in pixels
type: list
default: 0 0
Authors: Serge Poltavsky
License: GPL3 or later