§Object  

Abstraction: 
Every other type in Shapes is a subtype of §Object.

Construction  
Fields  
A value of type §Object has no fields.  
Description  
It is impossible to create values of type §Object, but the type is useful as the “any type”.
Note that it is by intention that §Object has no fields, to avoid name clashes with derived types. Instead, core functions such as ..Shapes..typeof are used to access properties of any value.
 
See also:  ..Shapes..typeof ..Shapes..Data..nil? 
§Class  

Abstraction: 
The type of types.
 
Construction  
See also:  ..Shapes..typeof  
Fields  
 
Description  
The §Class objects are the runtime representation of types in Shapes.
At the time of writing Shapes does not really have a type hierarchy, so there is no way support for checking the subtype relationship (the only nontrivial such relation is that between any type and §Object, which never has to be tested anyway). This will change in the future.
 
Involved operators  

§Float  

Abstraction: 
A scalar; a quantity without physical dimension.
 
Construction  
Syntax:  float  
Fields  
A value of type §Float has no fields.  
Involved operators  
A large number of types may be scaled by floats, which makes the list of operators very long for floats. Since dividing by a float is expected to mean the same as multiplying by the multiplicative inverse of the float, the list gets even longer.

§Boolean  

Abstraction: 
A truth value.
 
Construction  
Syntax:  boolean  
Fields  
A value of type §Boolean has no fields.  
Involved operators  

§Integer  

Abstraction: 
An integer number.
 
Construction  
Syntax:  integer  
See also:  ..Shapes..Geometry..duration  
Fields  
 
Involved operators  

§Length  

Abstraction: 
The §Length type represents a physical length. Lengths are often specified as a scalar times a unit of length.
 
Construction  
Syntax:  length  
Fields  
A value of type §Length has no fields.  
Involved operators  

§Offset  

Abstraction: 
The §Offset type represents a coordinate which is to be interpreted relative a local coordinate frame. The values are sometimes referred to as relative lengths, since they specify a length relative to something else.

Construction  
Operators:  ( + §Length ) 
Fields  
A value of type §Offset has no fields. 
§LengthLike  

Abstraction:  
Construction  
Fields  
A value of type §LengthLike has no fields. 
§Symbol  

Abstraction: 
A value defined by its name; the value analogue of identifiers in the source.
 
Construction  
Syntax:  symbol  
Fields  
A value of type §Symbol has no fields.  
Involved operators  

§Character  

Abstraction: 
A character.
 
Construction  
Syntax:  character  
See also:  ..Shapes..String..Unicode ..Shapes..String..AdobeGlyphList  
Fields  

§String  

Abstraction: 
A chunk of text.
 
Construction  
Syntax:  string  
See also:  ..Shapes..Debug..sourceof  
Fields  
 
Involved operators  

§FloatPair  

Abstraction: 
The §FloatPair type is typically a sized direction in the plane.
 
Construction  
Syntax:  floatpair  
See also:  ..Shapes..Geometry..coords  
Fields  
 
Involved operators  

§FloatTriple  

Abstraction: 
The §FloatTriple type is typically a sized direction in the perceivable space.
 
Construction  
Syntax:  floattriple  
See also:  ..Shapes..Geometry3D..coords  
Fields  
 
Involved operators  

§Coords  

Abstraction: 
The §Coords type is a pair of §Length ordinates.
 
Construction  
Syntax:  coords2D  
See also:  ..Shapes..Geometry..coords ..Shapes..Geometry..cornercoords ..Shapes..Geometry..mean ..Shapes..Geometry..pathpoint_mean ..Shapes..Geometry..controlling_maximizer ..Shapes..Layout..centerof ..Shapes..Layout..mspoint  
Fields  
 
Involved operators  

§CornerCoords  

Abstraction:  
Construction  
Syntax:  cornerpoint2D  
Fields  

§Coords3D  

Abstraction: 
The §Coords3D type is a triple of §Length ordinates.
 
Construction  
Syntax:  coords3D  
See also:  ..Shapes..Geometry..mean ..Shapes..Geometry..pathpoint_mean ..Shapes..Geometry..controlling_maximizer ..Shapes..Geometry3D..coords  
Fields  
 
Involved operators  

§PathPoint  

Abstraction: 
The §PathPoint type is a viapoint on a path, with optional rear and front control points (or handles).
 
Construction  
Syntax:  pathpoint2D  
Operators:  ( §Coords < §PathPoint ) ( §Coords < §PathSlider ) ( §PolarHandleBase < §PathPoint ) ( §PolarHandleBase < §PathSlider ) ( §PathPoint > §Coords ) ( §PathSlider > §Coords ) ( §PathPoint > §PolarHandleBase ) ( §PathSlider > §PolarHandleBase )  
Fields  
 
Involved operators  

§PathSlider  

Abstraction: 
An instance of §PathSlider is a position on a particular path. Hence, it is a combination of a path and a path time.
 
Construction  
See also:  ..Shapes..Geometry..maximizer ..Shapes..Geometry..pathpoint_maximizer ..Shapes..Geometry..intersection ..Shapes..Geometry..approximator ..Shapes..Geometry..pathpoint_approximator  
Fields  
A path slider has many fields. Many appear in pairs, and in most cases the either one can easily be computed given the other. The exception is when the slider is at the transition from one spline to another. Then the “reversed” version of the typefield refers to a property of the first spline, while the “plain“ version refers to a property of the second spline.
 
Involved operators  

§Path  

Abstraction: 
A curve.
 
Construction  
Operators:  ( §PathPoint  §PathPoint ) ( §Path  §Path ) ( §PathSlider  §PathSlider )  
See also:  ..Shapes..Geometry..reverse ..Shapes..Geometry..rectangle ..Shapes..Geometry..meetpaths ..Shapes..Geometry..svg_path ..Shapes..Geometry..upsample_balance ..Shapes..Geometry..upsample_inflections ..Shapes..Geometry..upsample_bends ..Shapes..Geometry..upsample_every ..Shapes..Layout..bbox ..Shapes..Geometry..circle ..Shapes..Geometry..ccw_arc ..Shapes..Geometry..cw_arc ..Shapes..Geometry..linkpaths ..Shapes..Geometry..buildchain ..Shapes..Geometry..pathmap ..Shapes..Geometry..sidepath ..Shapes..Geometry..sidepath2 ..Shapes..Geometry3D..generic_arc3D ..Shapes..Geometry3D..ccw_arc3D ..Shapes..Geometry3D..cw_arc3D  
Fields  
 
Description  
Since a path is a curve, and a curve is typically defined as a continuous mapping from a real parameter to the space containing the curve, Shapes allows objects of type §Path to be used as functions. Since the curve can be measured, a path can be applied also to §Length objects. Hence, [pth u] becomes a shorthand for ( pth.begin + u ).
 
Involved operators  

§MultiPath  

Abstraction: 
Basically, a set of curves.
This type in Shapes corresponds to the generic path type in pdf, that is, a list of continuous cubic splines. This can function as a way of grouping several splines into one object, but the real purpose is to define complex regions to fill with paint. Please refer to the pdf documentation for the semantics of filling complex paths.
 
Construction  
Operators:  ( §Path & §Path )  
Fields  
 
Involved operators  

§PathPoint3D  

Abstraction: 
 
Construction  
Syntax:  pathpoint3D  
Operators:  ( §Coords3D < §PathPoint3D ) ( §Coords3D < §PathSlider3D ) ( §PathPoint3D > §Coords3D ) ( §PathSlider3D > §Coords3D )  
Fields  
 
Involved operators  

§Path3D  

Abstraction:  
Construction  
Operators:  ( §PathPoint3D  §PathPoint3D ) ( §Path3D  §Path3D ) ( §PathSlider3D  §PathSlider3D )  
See also:  ..Shapes..Geometry..reverse ..Shapes..Geometry..meetpaths ..Shapes..Geometry..upsample_balance ..Shapes..Geometry..upsample_every  
Fields  
 
Involved operators  

§MultiPath3D  

Abstraction:  
Construction  
Operators:  ( §Path3D & §Path3D )  
Fields  
 
Involved operators  

§PathSlider3D  

Abstraction:  
Construction  
See also:  ..Shapes..Geometry..maximizer ..Shapes..Geometry..pathpoint_maximizer ..Shapes..Geometry..approximator ..Shapes..Geometry..pathpoint_approximator  
Fields  
A path slider has many fields. Many appear in pairs, and in most cases the either one can easily be computed given the other. The exception is when the slider is at the transition from one spline to another. Then the “reversed” version of the typefield refers to a property of the first spline, while the “plain“ version refers to a property of the second spline.
 
Involved operators  

§Drawable  

Abstraction: 
This is the common base type of drawable things in 2^{d}.
 
Construction  
See also:  ..Shapes..Graphics..spot ..Shapes..Graphics..clip ..Shapes..Graphics..clipodd ..Shapes..Graphics..stroke ..Shapes..Graphics..fill ..Shapes..Graphics..fillstroke ..Shapes..Graphics..fillodd ..Shapes..Graphics..TeX ..Shapes..Layout..bboxed ..Shapes..Layout..center ..Shapes..Layout..center_x ..Shapes..Layout..center_y ..Shapes..Layout..center_wlm ..Shapes..Layout..Xcenter_y §•Text  
Fields  
A value of type §Drawable has no fields.  
Involved operators  

§RasterImage isa §Drawable  

Abstraction: 
Rasterized image.
 
Construction  
See also:  ..Shapes..Graphics..import_raster  
Fields  

§CapStyle  

Abstraction: 
The type for ..Shapes..Traits..@cap.

Construction  
Fields  
A value of type §CapStyle has no fields. 
§JoinStyle  

Abstraction: 
The type for ..Shapes..Traits..@join.

Construction  
Fields  
A value of type §JoinStyle has no fields. 
§Dash  

Abstraction: 
The type for ..Shapes..Traits..@dash.
 
Construction  
See also:  ..Shapes..Traits..dashpattern  
Fields  
A value of type §Dash has no fields.  
Description  
The total length of the dash pattern can be obtained using ..Shapes..Numeric..Math..abs.
 
Involved operators  

§Alpha  

Abstraction: 
The type of values produced by ..Shapes..Traits..alphashape and ..Shapes..Traits..alphaopacity, to be used with ..Shapes..Traits..@strokingalpha and ..Shapes..Traits..@nonstrokingalpha.

Construction  
See also:  ..Shapes..Traits..alphashape ..Shapes..Traits..alphaopacity 
Fields  
A value of type §Alpha has no fields. 
§ColorSpace  

Abstraction: 
A parameterization of colors.

Construction  
Fields  
A value of type §ColorSpace has no fields.  
See also:  ..Shapes..Traits..@blend 
§Function  

Abstraction: 
In Shapes, the type §Function serves two purposes; an object of type §Function may be either a pure function, or a nonpure function. A pure function cannot have side effects, and will always return the same result given the same arguments and dynamic environment. Note that changing the dynamic environment may change the result of a function.
 
Construction  
Syntax:  function  
Fields  
A value of type §Function has no fields.  
Involved operators  

§Transform  

Abstraction: 
Below, a transform is denoted ( L, p ), defined by ( L, p )( u ) = L u + p.
 
Construction  
See also:  ..Shapes..Geometry..affinetransform ..Shapes..Geometry..shift ..Shapes..Geometry..rotate ..Shapes..Geometry..scale ..Shapes..Geometry..inverse  
Fields  
 
Involved operators  

§Transform3D  

Abstraction: 
Below, a transform is denoted ( L, p ), defined by ( L, p )( u ) = L u + p.
 
Construction  
See also:  ..Shapes..Geometry3D..affinetransform ..Shapes..Geometry3D..shift ..Shapes..Geometry3D..rotate ..Shapes..Geometry3D..scale ..Shapes..Geometry3D..inverse  
Fields  
 
Involved operators  

§Span isa ( last::( §Integer ∪ §Float ∪ §Length ) → §Seq )  

Abstraction: 
Given the last position in a container, the §Span expands to a range of values. The type of last must match the types produced by the thunks in the §Span.
The expansion is often requested by methods of container types that support the use of §Span to denote ranges of values inside the container.
Calling a §Span is very much like evaluating a delayed call to ..Shapes..Data..range, see ..Shapes..Data..span.

Construction  
See also:  ..Shapes..Data..span 
Fields  
A value of type §Span has no fields. 
[§ConsPair §A §D]  

Abstraction: 
Container for two values. Often used to form linked lists and trees.
 
 
Construction  
See also:  ..Shapes..Data..cons  
Fields  
 
Description  
When used to build linked lists, one shall use ..Shapes..Data..nil to terminate the list. Recall that this value is recognized by ..Shapes..Data..nil?.
The following example illustrates the extension ..Shapes..Data / seqsupport and how the laziness of ..Shapes..Data..cons allows infinite streams to be defined.
 
See also:  ..Shapes..Data..nil? 
[§Seq §E]  

Abstraction: 
A singly linked list.
 
 
Defined as:  ( [§SeqPair §E] ∪ §SeqNil )  
See also:  ..Shapes..Data..nil? ..Shapes..Data..fcons ..Shapes..Data..list ..Shapes..Data..range 
[§SeqPair §E] isa [§Seq §E]  

Abstraction: 
A nonempty singly linked list.
 
 
Defined as:  ( [§ConsPair §E [§Seq §E]] ) 
§SeqNil isa [§Seq §E]  

Abstraction: 
An empty singly linked list.
 
Construction  
Fields  
 
See also:  ..Shapes..Data..nil? 
§Array isa ( ::§Integer → §Value )  

Abstraction: 
Values of type §Array are onedimensional arrays. The array has a finite size, does not contain any thunks, and any element can be accessed in constant time by specifying its index. The index of the first element is 0.
 
Construction  
See also:  ..Shapes..Data..array §•Array  
Fields  

§Structure  

Abstraction: 
Container mirroring the information being passed to the callee in a function application. That is, it may contain both named and ordered fields.
 
Construction  
Syntax:  structure  
See also:  ..Shapes..Data..unlist  
Fields  
 
Description  
The contents of a §Structure value can be passed to a function using the splitcall. The named fields of a structure may also be accessed just like the named fields of any other compound value. Ordered values may be accessed using trivial helper functions (simply returning the appropriate ordered argument).
For an example showing the various ways to work with §Structure values, see the structure syntax.

§GraphKey  

Abstraction: 
A key identifying some entity in a graph, like a node or a graph partition.

Defined as:  ( §Symbol ∪ §Integer ) 
[§Node §N §E]  

Abstraction: 
The §Node type is a reference to a node belonging to a particular graph. It gives constant time access to the referenced graph node.
 
 
Construction  
Fields  
 
See also:  §Edge §Graph §NodeData 
[§Edge §N §E]  

Abstraction: 
The §Edge type is a reference to an edge belonging to a particular graph. It gives constant time access to the referenced graph edge.
 
 
Construction  
Fields  
 
See also:  §Node §Graph §EdgeData 
[§UEdge §N §E]  

Abstraction: 
An undirected edge.
 
 
Defined as: 
( [§Edge §N §E] ∩ (> 
[§DEdge §N §E]  

Abstraction: 
A directed edge.
 
 
Defined as: 
( [§Edge §N §E] ∩ (> 
[§MultiEdge §N §E]  

Abstraction: 
The §MultiEdge type is set of parallel edges. It provides a simplified way of working with multigraphs when one is not interested in the multiplicity of parallel edges. Two edges (compare §Edge) are parallel if and only if they are both directed or both undirected, and have the same source and target nodes.
 
 
Construction  
Fields  
 
See also:  §Edge §Graph 
[§UMultiEdge §N §E]  

Abstraction: 
An undirected multiedge.
 
 
Defined as: 
( [§MultiEdge §N §E] ∩ (> 
[§DMultiEdge §N §E]  

Abstraction: 
A directed multiedge.
 
 
Defined as: 
( [§MultiEdge §N §E] ∩ (> 
[§Graph §N §E]  

Abstraction: 
Graph of nodes and edges.
 
 
Construction  
See also:  ..Shapes..Data..graph §•Graph  
Fields  
 
Description  
The §Graph data structure is designed to fill the gap created by the functional language's restriction to nonrecursive data structures. A recursive data structure is when a value either directly or indirectly contains a reference to itself, like a node with a reference to its neighbor, which in turn has a reference back to the first node. In an imperative language, it is possible to have nodes containing references to their adjacent nodes, and this is often the most natural and efficient way of modeling a graph.
Since Shapes is functional, however, there cannot be recursive data structures, and so one has to model graphs in a nonrecursive manner. Of course, there are many such representations, one of the most common being some kind of adjacency matrix, where each nonzero entry in the matrix represents an edge in the graph, with the row in the matrix corresponding to the source node, and the column in the matrix corresponding to the target node. While such a matrix representation may be good for representing the graph structure alone, it is rather inconvenient when one wants values associated with the nodes and edges, and it may also be inefficient for certain operations depending on the details of the matrix representation.
Shapes uses function calls to break the cycles that would otherwise result in recursive data structures. This sometimes turns out as member functions that are often called with no arguments, but that could still not be plain nonfunction fields.
 
See also:  §Walk 
[§Walk §N §E]  

Abstraction: 
The §Walk type is a walk in a particular graph. A walk has a start and an end node, and a sequence of edges that can be traced in order to get from the start node to the end node.
 
 
Construction  
See also:  ..Shapes..Data..walk  
Fields  
 
Description  
A §Walk is the representation of a traversal of a graph along its edges. In general, nodes and edges may be visited zero or more times along the walk, but by placing constraints on the §Boolean properties of the walk, one obtains more specialized types of walks, such as trails or Eulerian cycles.
 
See also:  §Graph 
[§NodeData §N]  

Abstraction: 
The §NodeData type is a structure holding data used to define a node during graph construction.
Strictly speaking, the type only consists of the field key, since the other field may be omitted where §NodeData is used to construct graphs.
 
 
Construction  
Fields  
 
See also:  §Node ..Shapes..Data..graph §EdgeData 
[§EdgeData §E]  

Abstraction: 
The §EdgeData type is a structure holding data used to define an edge during graph construction.
Strictly speaking, the type only consists of the fields source and target, since the other fields have default values where §EdgeData is used to construct graphs.
 
 
Construction  
Fields  
 
See also:  §Edge ..Shapes..Data..graph §NodeData 
§Font  

Abstraction: 
A font face, used with ..Shapes..Text..@font.
 
Construction  
See also:  ..Shapes..Text..font  
Fields  
 
Description  
Support for other fonts than the standard fonts of the pdf standard (these are restricted to the characters in the MacRoman encoding) is only available if the Shapes compiler has been built with the optional FreeType library.

§TextOperation  

Abstraction: 
An object to be used with §•Text.

Construction  
Fields  
A value of type §TextOperation has no fields.  
Description  
This type has several subtypes, but only one of them (§KernedText) can be constructed by the user; other subtypes are currently only used internally in the Shapes compiler.

§KernedText isa §TextOperation  

Abstraction: 
A string of text, possibly with kerning distances inserted between some of the characters.
 
Construction  
See also:  ..Shapes..Text..kerning ..Shapes..Text..kern  
Fields  

§TextRenderingMode  

Abstraction: 
Indicate wheter to stroke and/or fill rendered text, used with ..Shapes..Text..@rendering.
 
Construction  
See also:  ..Shapes..Text..textmode  
Fields  
 
Description  
The text rendering modes os Shapes correspond directly to the nonclipping text rendering modes in pdf. The clipping rendering modes are used internally, but are only accessible to users through ..Shapes..Graphics..clip.
See the design note in ..Shapes..Text..@rendering for the motivation behind this type.

§DynamicBindings  

Abstraction: 
Represents dynamic bindings that can be put in scope using the withdynamic syntax.
 
Construction  
See also:  ..Shapes..bindings  
Fields  
A value of type §DynamicBindings has no fields.  
Involved operators  

§RandomSeed  

Abstraction: 
This is the type of hot values that spawn §•Random states.
 
Construction  
Fields  
A value of type §RandomSeed has no fields. 
§Backtrace  

Abstraction: 
Wrapper for escape continuations, not allowing the continuation to be invoked, just allowing the continuation to be used to generate backtraces.
 
Construction  
Syntax:  backtraceescapecontinuation  
Fields  
 
Description  
Direct access to nonescaping continuations is not permitted in Shapes because of all the semantic issues they bring to a language. However, to be able to build a good errorhandling mechanism based on continuations it is neccessary to be able to capture the backtrace where the error occurs. Early versions of Shapes had a special error function that immediately aborted evaluation, using the compilers ability to generate the backtrace at the point where evaluation was aborted. However, to let the user program errorcatching mechanisms it is necessary that evaluation may proceed for some time after the error occurs, and if it is later decided that the error cannot be handled one must be able to inform the user about where the error occurred. This means that the information available in a continuation must be possible to pass from the point where the error occurs to where it is handled. This type provides the means to do exactly that, and since it doesn't provide a way to invoke the continuation it wraps, its use has no serious implications for the semantics of the language.
 
See also:  ..Shapes..C—error 
§Exception  

Abstraction: 
Exceptions that the user can catch by binding ..Shapes..C—error.
 
Construction  
Fields  
 
Description  
The symbols used for the kind field are given by the table below.

§ArrowHead  

Abstraction: 
An arrowhead that ..Shapes..Graphics..stroke can use when painting paths.

Defined as: 
( ::§Path →
(> 
See also:  §ArrowHead3D 
§ArrowHead3D  

Abstraction:  
Defined as: 
( ::§Path3D →
(> 