Reference Shapes

Peter Maersk-Moller

Reference manual - Shapes

This is the reference manual for Snowmix for the commands belonging to the the shapes commands for creating and placing shapes. See also:

Overview

  • shape add - Add/delete a shape place holder or list created shape place holders.
  • shape arc_cw - Define an arc element clock wise within a shape.
  • shape arc_ccw - Define an arc element counter clock wise within a shape.
  • shape clip - Perform clipping along the path within a shape.
  • shape closepath - Close path in a shape.
  • shape curveto - Define absolute a curve element in a shape.
  • shape curverel - Define relative a curve element in a shape.
  • shape feed - Include in a shape a video feed.
  • shape fill - Define a fill operation within a shape.
  • shape fill preserve - Define a fill operation within a shape and preserve the path.
  • shape filter - Set filter/overlay algorithm for overlaying/scaling/rotating an image or feed in a shape.
  • shape help - List Shape syntax overview.
  • shape info - List shape info data.
  • shape image - Include in a shape a loaded image.
  • shape inshape - Include shape in a shape.
  • shape line width - Set line width in a shape.
  • shape line join - Set how lines are joined in a shape.
  • shape line cap - Set how lines are ended in a shape.
  • shape lineto - Define a line segment in a shape drawing absolute within the shape.
  • shape linerel - Define a line segment in a shape drawing relative within the shape.
  • shape list - List defined shapes or list definition of a specific shape
  • shape mask pattern - Define a pattern mask for a shape.
  • shape moveentry - Move or delete an entry, a line, within a shape
  • shape moverel - Move to a relative coordinate in a shape within a shape.
  • shape moveto - Move to an absolute coordinate in a shape within a shape.
  • shape newpath - Start a new path within a shape.
  • shape operator - Define operator for adding/subtracting/overlaying within a shape.
  • shape paint - Define a paint operation within a shape.
  • shape pattern add - Create/delete a pattern place holder or list pattern place holders.
  • shape pattern radial - Define a radial pattern.
  • shape pattern linear - Define a linear pattern.
  • shape pattern stoprgb - Define stop points within a linear or radial pattern.
  • shape rectangle - Define a rectangle within a shape.
  • shape recursion - Define allowed recursion level within a shape.
  • shape restore - Restore a save context within a shape.
  • shape rotation - Define a relative or absolute rotation within a shape.
  • shape save - Save a context within a shape.
  • shape scale - Scale absolute or relative within a shape.
  • shape source alphamul - Multiply a constant to the alpha value within a shape.
  • shape source rgb - Set RGB value within a shape.
  • shape source rgba - Set RGB and alpha channel value within a shape.
  • shape source pattern - Add a pattern to a shape.
  • shape stroke - Perform a stroke within a shape.
  • shape stroke preserve - Perform a stroke within a shape and preserve path.
  • shape translate - Move coordinate system within a shape.
  • shape transform - Add a coordinate, rotation and scale transformation to a shape.
  • shape verbose - Set verbose level within the CVideoShape Class.

Syntax Overview

  • shape add [shape id> [<shape name>]] // shape id alone deletes shape
  • shape arc_cw <shape id> <x> <y> <radius> <angle from> <angle to>
  • shape arc_ccw <shape id> <x> <y> <radius> <angle from> <angle to>
  • shape clip <shape id>
  • shape closepath <shape_id>
  • shape curveto <shape id> <x1> <y1> <x2> <y2> <x3> <y3>
  • shape curverel <shape id> <x1> <y1> <x2> <y2> <x3> <y3>
  • shape feed <shape id> <feed id> <x> <y> <scale x> <scale y>
  • shape fill <shape id>
  • shape fill preserve <shape id>
  • shape filter <shape id> (fast | good | best | nearest | bilinear | gaussian)
  • shape help // list this list
  • shape info
  • shape image <shape id> <image id> <x> <y> <scale_x> <scale_y>
  • shape inshape <shape id> <inshape id>
  • shape line width <shape id> <width>
  • shape line join <shape id> (miter | round | bevel) [<miter limit>]
  • shape line cap <shape id> (butt | round | square)
  • shape lineto <shape id> <x> <y>
  • shape linerel <shape id> <x> <y>
  • shape list <shape id>
  • shape mask pattern <shape_id> <pattern id>
  • shape moveentry <shape id> <entry id> [<to entry>]
  • shape moverel <shape id> <x> <y>
  • shape moveto <shape id> <x> <y>
  • shape newpath <shape id>
  • shape operator <shape id> (clear | source | over | in | out | atop | dest | dest_over | dest_in | dest_out | dest_atop | xor | add | saturate | multiply | screen | overlay | darken | lighten | dodge | burn | hard | soft | difference | exclusion | hsl_hue | hsl_saturation | hsl_color | hsl_luminosity)
  • shape paint <shape id> [<alpha>]
  • shape pattern add [<pattern id> [<pattern name>]]
  • shape pattern radial <pattern id> <cx0> <cy0> <radius0> <cx1> <cy1> <radius1>
  • shape pattern linear <pattern id> <x1> <y1> <x2> <y2>
  • shape pattern stoprgb <pattern id> <offset> <red> <green> <blue> [<alpha>]
  • shape rectangle <shape id> <x> <y> <width> <height>
  • shape recursion <shape id> <level>
  • shape restore <shape id>
  • shape rotation <shape id> <relative rotation> [<absolute rotation>]
  • shape save <shape id>
  • shape scale <shape id> <scale x> <scale y>
  • shape source alphamul <shape id> <alpha>
  • shape source rgb <shape id> <red> <green> <blue> [<alpha>]
  • shape source rgba <shape id> <red> <green> <blue> [<alpha>]
  • shape source pattern <shape_id> <pattern id>
  • shape stroke <shape id>
  • shape stroke preserve <shape id>
  • shape translate <shape id> <offset x> <offset y>
  • shape transform <shape id> <xx> <yx> <xy> <yy> <x0> <y0>
  • shape verbose [<level>]

shape add

Name

shape add - add/create a place holder for a shape

Synopsis

shape add [<shape id> [<shape name>]]

Description

The shape add command, when given with the parameters shape id and a shape name, creates and add a place holder for a shape. The shape id is a positive integer. If the command is given without any parameters, it will list shapes created/added. If the command is given with only the parameter shape id, the command will delete the shape and its place holder identified by the shape id. A created shape can be added a long list of Cairo Graphics Primitives. By default, a maximum of 16 shapes can be created. The maximum number of shapes can be set to a higher using the command *maxplaces shapes <number of shapo> before any shape command is executed. After the first shape command is executed, the maximum number of shapes is fixed for the rest of the duration the program is running.

Example

    shape add 1 basic shape

    shape add

The first example creates a shape place holder with the shape id 1 and the name basic shape. The second example lists the shapes created shwon below:

    STAT:  shape 1 ops 0 name basic shape
    STAT:

See also

shape help, shape info, shape list, shape verbose, shape place help, maxplaces, Cairo Graphics Primitives

shape pattern add

Name

shape pattern add - add/create a place holder for a shape pattern

Synopsis

shape pattern add [<shape pattern id> [<shape pattern name>]]

Description

The shape pattern add command, when given with the parameters shape pattern id and a shape pattern name, creates and add a place holder for a shape pattern. The shape pattern id is a positive integer. If the command is given without any parameters, it will list shapes pattern created/added. If the command is given with only the parameter shape pattern id, the command will delete the shape pattern and its place holder identified by the shape pattern id. A created shape pattern can be added a smaller list of Cairo Graphics primitives for patterns. By default, a maximum of 16 shapes can be created. To change it, a change in src/video_shape.h for MAX_PATTERNS must be made.

Example

    shape pattern add 1 basic pattern

See also

shape help, shape info, shape list, shape pattern radial, shape pattern linear, shape pattern stoprgb

shape help

Name

shape help - list available shape commands and theior syntax.

Synopsis

shape help

Description

The shape help command lists the available shape commands and their syntax. This command is different from the shape place help command.

Example

    shape help

See also

shape info, shape list, shape verbose, shape place help, Cairo Graphics Primitives

shape info

Name

shape info - list information on shapes.

Synopsis

shape info

Description

The shape info command lists information on shapes created as shown in the example below:

Example

    shape info

    STAT:  shape info
    STAT:  shapes        : 7 of 16
    STAT:  placed shapes : 3 of 16
    STAT:  verbose level : 0
    STAT:  shapes : ops_count shape_name
    STAT:  - shape 1 : 1 Unit Circle
    STAT:  - shape 2 : 1 Unit Rectangle
    ......
    STAT:

See also

shape add, shape list, shape verbose, shape place help

shape list

Name

shape list - list available shapes or list a single shape

Synopsis

shape list [<shape id>]

Description

The shape list command if given without the parameter shape id lists the available shapes. This is identical to issuing the command shape add without any parameters. If the shape list command is given with a shape id as parameter, the command will list the content of that particular shape, if it exists.

Example

    shape list
    shape list 1

The first example will list the shapes as perhaps shown below:

    STAT:  shape 1 ops 1 name Unit Circle
    STAT:  shape 2 ops 1 name Unit Rectangle
    STAT:  shape 3 ops 5 name Unit Diamond
    STAT:  shape 4 ops 5 name Unit Square
    ......
    STAT:

The second example will list the shape identified by the shape id and it may look like this:

    STAT:  shape 3 ops 5 name Unit Diamond
    STAT:  - 1 moveto 0.5000 0.0000
    STAT:  - 2 linerel -0.5000 0.5000
    STAT:  - 3 linerel -0.5000 -0.5000
    STAT:  - 4 linerel 0.5000 -0.5000
    STAT:  - 5 linerel 0.5000 0.5000
    STAT:

See also

shape info, shape help, shape verbose, shape place help, Cairo Graphics Primitives

shape moveentry

Name

shape moveentry - move or delete an entry in a shape definition.

Synopsis

shape moveentry <shape id> <entry id> [<to entry>]

where entry id = N | first | last
and to entry = N | first | last
N is a positive integer.

Description

The shape moveentry command is used to move or delete an entry in a shape. The entries can be listed using the shape list command. This is shown in the examples below.

Example

    shape list 3

    STAT:  shape 3 ops 5 name Unit Diamond
    STAT:  - 1 moveto 0.5000 0.0000
    STAT:  - 2 linerel -0.5000 0.5000
    STAT:  - 3 linerel -0.5000 -0.5000
    STAT:  - 4 linerel 0.5000 -0.5000
    STAT:  - 5 linerel 0.5000 0.5000
    STAT:

    shape moveentry 3 2
    shape list 3

    STAT:  shape 3 ops 4 name Unit Diamond
    STAT:  - 1 moveto 0.5000 0.0000
    STAT:  - 2 linerel -0.5000 -0.5000
    STAT:  - 3 linerel 0.5000 -0.5000
    STAT:  - 4 linerel 0.5000 0.5000
    STAT:

    shape moveentry 3 last first
    shape moveentry 3 2 last

    STAT:  shape 3 ops 4 name Unit Diamond
    STAT:  - 1 linerel 0.5000 0.5000
    STAT:  - 2 linerel -0.5000 -0.5000
    STAT:  - 3 linerel 0.5000 -0.5000
    STAT:  - 4 moveto 0.5000 0.0000
    STAT:

Snowmix version 0.4.1 has a bug that deletes an entry if the command shown below is executed where N is any number

    shape moveentry 3 first N
    shape moveentry 3 last N

The workaround is to avoid using the keywords first or last for the entry id unless one of the keywords is also used for the to entry parameter as in first to last or last to first.

See also

shape info, shape list

shape verbose

Name

shape verbose - be verbose to print more information.

Synopsis

shape verbose [<verbose level>

Description

The shape verbose command can be used to set the verbose level for shapes. Higher levels will print more information. By default the verbose level is set to 0. At that level, most shape commands will be silent when succesful executed. At level 1, every command will at least return one line of text terminated by the newline character unless it is a command intended to list mutiple lines. In the latter case, such commands last line will have a uniq pattern different from any other line generated by the command, usually like

    STAT:

When the command is given without a verbose level as parameter, the command will toggle the verbose level between 0 and 1.

Example

    shape verbose

See also

shape info, shape list, shape help, shape place help

shape place help

Name

shape place help - list available shape place commands and their syntax.

Synopsis

shape place help

Description

The shape place help command lists the available shape place commands and their syntax. This command is different from the shape help command.

Example

    shape place help

See also

shape info, shape list, shape verbose, shape help

shape overlay

Name

shape overlay - overlay a placed shape

Synopsis

shape overlay <place id> | <place id>..<place id> | all | <place id>..end [ <place id> ......]

Description

The shape overlay command overlays placed shapes. The command can only be executed from inside the scripts set by the overlay pre and the overlay finish commands. These scripts can alternatively execute tcl procedures that returns shape overlay commands if needed and wanted

Example

    shape overlay 2 5 3
    shape overlay 3..end
    shape overlay all
    shape overlay 2 7 10..end

See also

shape info, shape list, shape verbose, shape help


Related

Discussion: Reference manual for shapes, a wiki on how to use shapes and a reference for Cairo Graphics
Discussion: Reference mnual for feeds available.
Wiki: Audio
Wiki: Home
Wiki: Reference Audio Feeds
Wiki: Reference Audio Mixers
Wiki: Reference Audio Sinks
Wiki: Reference Cairo Graphics
Wiki: Reference Command
Wiki: Reference Feeds
Wiki: Reference GL Shapes
Wiki: Reference General
Wiki: Reference Images
Wiki: Reference Placed GL Shapes
Wiki: Reference Placed Shapes
Wiki: Reference Shapes
Wiki: Reference Texts
Wiki: Reference Virtual Feeds
Wiki: Reserved Commands
Wiki: Shapes
Wiki: Snowmix Guide
Wiki: Tutorials
Wiki: Video Text

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks