For version 0.7.0.
To top.  Up: ..Applications..Blockdraw

blockdraw


Alphabetical index
@abovelabelmargin bbconnect @belowlabelmargin blconnect @blocklw @blockpainter @blockspacefar @blockspacelabelspace @blockspacenear @blockspaceveryfar @blockspaceverynear bottompoint brconnect connect @connectionlw @connectpainter fracblock @fracblockry hhconnect hvconnect lbconnect leftpoint @leftrightlabelmargin llconnect longblock @longblockrx @longblockry longenoughblock longenoughfracblock lrconnect ltconnect putblockAbove putblockBelow putblockFarAbove putblockFarBelow putblockFarLeft putblockFarRight putblockLabelMarginAbove putblockLabelMarginBelow putblockLabelMarginLeft putblockLabelMarginRight putblockLabelSpaceAbove putblockLabelSpaceBelow putblockLabelSpaceLeft putblockLabelSpaceRight putblockLeft putblockNearAbove putblockNearBelow putblockNearLeft putblockNearRight putblockOrigin putblockRight putblockVeryFarAbove putblockVeryFarBelow putblockVeryFarLeft putblockVeryFarRight putblockVeryNearAbove putblockVeryNearBelow putblockVeryNearLeft putblockVeryNearRight putlabelAbove putlabelBelow putlabelLeft putlabelRight rbconnect rightpoint rlconnect roundblock rrconnect rtconnect @signmarginoffset @signmarginslide sizedblock @smallblockr splitdot squareblock sumpicture tbconnect tbconnect termcircle @textscaling tlconnect toppoint trconnect ttconnect vhconnect vvconnect

Namespace:  ..Applications..Blockdraw

Block diagram example
Angry
An application of the blockdraw extension. This example contains some non-standard solutions, showing how the functions of this extension can be combined with standard Shapes operations.

Source: show/hide visit
The original implementation of this concept was for MetaPost (it is available from CTAN, and part of some LaTeX distributions). It was then translated into an early version of Shapes, and it was believed that it would become much cleaner if a user-defined type would be used to represent the blocks. At that time, the name of the extension was blockdraw_wfo, where the wfo stands for Waiting For Objects. However, it has turned out that by not using a user-defined type, but relying simply on §Drawable values instead to represent blocks, the applicability of this extension has become much wider than expected. Hence, the _wfo tag has been removed, and there are currently no plans for changing the representation of blocks.
Sections:    Tutorial    Settings    Blocks    Layout    Connection points    Connections    Labels

Tutorial

Before going into the detailed description of the bindings introduced by this extension, this tutorial will serve as a quick start for them who just want to see what the source code for some examples could look like. This tutorial is really not much more than that; a sequence of increasingly complex examples.
Hello world!
Angry
The simplest of all examples. This is simply a label placed in a rectangular block of standard size. Have a look at the source code right away!

Source: show/hide visit
Relative placement
Angry
Several functions are provided to put a block at a predefined distance apart from a given block. They are non-pure functions that both add the positioned object to a destination state and return it so that it can be used for future reference. See Layout for a complete list of layout functions.
The reason why sumpicture is a function rather than a §Drawable is that the result is a function of the dynamic environment; both the radius size of the block, the width of the line, and the size of the summation sign, depend on dynamic bindings.

Source: show/hide visit
Connection points
Angry
A connection point function is used to find an appropriate connection point of a block with two inputs. Exactly how this point is pointed out using a connection arrow from nowhere is not important here.

Source: show/hide visit
Connections and labels
Angry
Depending on the relative layout of blocks, a varying degree of manual effort is needed to get the connecting paths right. In this example, all paths but the feed-back path can be deduced automatically using connect. The constructed path is both painted and returned. Most of the time the return value is ignored (by means of ..Shapes..ignore), but it is useful when we want to place a label along the path. See Connections for the complete set of functions for the purpose of making connections.
Putting a label along the connection is easy. To make the source code readable, it is a good idea to bind the connection path to a variable, and then use this variable when placing the label. Special purpose functions are provided to ensure a consistent layout of labels; the user need only select a point on the path (preferably using ..Shapes..Layout..mspoint) and a side of that point (by using the “putlabel-function” named accordingly), and how the label should be aligned.
Putting a label at a terminal point is similar to labeling a connection, the only difference is how the point to be labeled is selected. Note that for a ..Shapes..Graphics..pointpicture, all connection point functions will return the same point.
This example also shows how to place signs at connection points, and how to indicate a point where a signal splits by a small dot.
This is a comparatively simple figure, containing three different kinds of objects: blocks, connections and annotations along the connections. This example also follows the good habit to let preferences that might be shared by several figures be extracted into a separate file (link).

Source: show/hide visit
More layout
Angry
Laying out the blocks of a slightly more complicated diagram, and constructing a nice path to be dashed.
The art of making nice block diagrams using this extension turns out to be a matter of having an idea for how to select from the predefined distances. Here are a few guidelines from the author:
  • Use Far between terminals and the closest block they connect to.
  • Use VeryNear between a block and a split point on its output.
  • Use Near between horizontally aligned blocks when there shall be no label on the connection.
  • Use Far between horizontally aligned blocks when there shall be a label on the connection.
  • Use Near between vertically aligned blocks.
Note how the dashed line was handled similarly to a label when selecting the distance after the middle summation.
There are many situations when simple guidelines like the ones above cannot be applied successfully, and one will have to improvise. For example, the shorter distances may be preferred if the graphics becomes too wide, although an alternative solution to this is to change the values of the predefined lengths instead, see Settings.

Source: show/hide visit
OK, this is the end of the tutorial. Hopefully you didn't find the examples too difficult to follow — did you even get interested to learn more about the range of functions provided?

Settings

This extension introduces a large number of dynamic variables to control various aspects of the appearance. The variables fall naturally into different categories, and are presented accordingly below.

Block size

BindingTypeDefaultDescription
@longblockrx§Length0.7 cm
Half the width of a long block.
@longblockry§Length0.4 cm
Half the height of a long block.
@smallblockr§Length0.3 cm
Half the side length a small square block, and also the radius of round blocks.
@fracblockry§Length0 cm
Half the height of blocks which are meant to have enough vertical space for a standing fraction in the label.

Line widths

BindingTypeDefaultDescription
@connectionlw§Length0.8 bp
The line width for connections.
@blocklw§Length0.8 bp
The line width for the border of blocks.

Margins

BindingTypeDefaultDescription
@abovelabelmargin§Length1.5 mm
The margin to use when labels are placed above an object.
@belowlabelmargin§Length1.5 mm
The margin to use when labels are placed below an object.
@leftrightlabelmargin§Length1 mm
The margin to use when labels are placed to the left or to the right of an object.
@signmarginslide§Length1.5 mm
The margin for signs, in the direction of the connecting path.
@signmarginoffset§Length2 mm
The margin for signs, in the direction away from the connecting path.

Space between blocks

BindingTypeDefaultDescription
@blockspaceverynear§Length3 mm
A very small distance.
@blockspacenear§Length6 mm
A rather small distance.
@blockspacelabelspace§Length8 mm
A distance that may be used when there should be enough space for a small label between the blocks.
@blockspacefar§Length10 mm
A rather big distance.
@blockspaceveryfar§Length15 mm
A very big distance.

Miscellaneous

@textscaling
Used by:
Type: ( ::§Drawable  §Drawable )
Default binding:[scale 1]
Transform that is applied to anything which is thought to be a label. Useful to scale down labels to allow smaller diagrams.
An alternative could be to produce big diagrams, and then scale the result at the end, but this is a mess compared to always producing graphics in the true scale.
@connectpainter
Used by:
Type: ( ::§Path  §Drawable )
Default binding:[..Shapes..Graphics..stroke head:..Shapes..Graphics..ShapesArrow ...]
The function used to paint connections.
When called from within this extension, ..Shapes..Traits..@width will always be set to @connectionlw. Hence, users who call @connectpainter directly should consider using this line width as well.
@blockpainter
Used by:
Type: ( ::§Path  §Drawable )
Default binding:..Shapes..Graphics..stroke
The function used to paint the block border paths.
When called from within this extension, ..Shapes..Traits..@width will always be set to @blocklw. Hence, users who call @blockpainter directly should consider using this line width as well.
This function will be used before labels are painted, so it may be used to paint the interior of blocks with a background color.

Blocks

These functions return plain §Drawable objects — they are dumb in this sense. A more accurate way of modelling things would at least include information about connection points with each block, while we compute connection points assuming that the blocks are rectangular, see Connection points.
Blocks
Angry
The range of predefined blocks for use in block diagrams.

Source: show/hide visit
sizedblock
lbl::§Drawable rx::§Length ry::§Length §Drawable
Dynamic references:none
This function is considered low-level and should not be used directly in standard applications.
Constructs a rectangular block, with a label positioned nicely inside.
See also:longblock squareblock fracblock longenoughblock longenoughfracblock
longblock
lbl::§Drawable §Drawable
Dynamic references:none
Constructs a long rectangular block of standardized size.
Calls sizedblock internally, which uses additional dynamic variables.
See also:sizedblock
squareblock
lbl::§Drawable §Drawable
Dynamic references:none
Constructs a small square block of standardized size.
Calls sizedblock internally, which uses additional dynamic variables.
See also:sizedblock
fracblock
lbl::§Drawable §Drawable
Dynamic references:none
Constructs a long rectangular block of standardized size, tall enough to accommodate a standing fraction in the label.
Calls sizedblock internally, which uses additional dynamic variables.
See also:sizedblock
longenoughblock
lbl::§Drawable §Drawable
Dynamic references:none
Like longblock, but makes the block wider if required to accommodate the label.
longenoughfracblock
lbl::§Drawable §Drawable
Dynamic references:none
Like fracblock, but makes the block wider if required to accommodate the label.
roundblock
lbl::§Drawable §Drawable
Dynamic references:none
Constructs a small circular block of standardized size.
sumpicture
§Drawable
Returns a small circular summation block. Note that this must be a function since the result shall depend on dynamic bindings!
Calls roundblock internally, which uses additional dynamic variables.
splitdot
§Drawable
Dynamic references:none
Returns a small circular dot to use where a signal splits. The size is chosen relative to the width of the connection strokes. Note that this must be a function since the result shall depend on dynamic bindings!
termcircle
§Drawable
Dynamic references:none
Returns a small circle that can be used if a signal terminal is to be emphasized. The size is chosen relative to the width of the connection strokes. Note that this must be a function since the result shall depend on dynamic bindings!

Layout

The functions are non-pure, as they have the bad (?) habit of tacking on their return value to a §•Group. The reason is that it is almost always convenient to bind a block to a variable so that it can be referred to, and there is seldom reason not to draw it as soon as it is laid out. If one does not want the object to be drawn to any state, one may simply pass ..Shapes..•ignore as the destination.
The number of functions in this section may seem overwhelming, but the reason for this is to hide degrees of freedom in order to gain in consistency of the spacing between blocks in the diagram. Except putblockOrigin, uses typically select among function being named after two axes for the user to choose from; one distance axis (VeryNear, Near, LabelSpace, Far, VeryFar), and one direction axis (Left, Right, Below, Above). This explains 20 of the functions here. In addition, there are some low-level functions, and another four where the point on the distance axis is LabelMargin (here, the distance depends on the direction, but users typically don't use these functions anyway).
Layout
Angry
A selection of the layout functions. The name of the functions reflect which dynamic variable is used to determine the distance between the objects, in the direction also given by the name of the function. Note that all these functions are non-pure, as they allow the object being laid out to be added to a destination variable in addition to returning it.
Note that horizontal positioning does not care about the object's vertical extent, and vice versa. This is not only apparent in the example with the block labeled “High”, but also in the examples where the new block is a plain label centered at its leftmost baseline point.
The function putblockOrigin is different from the others in that it puts the block at the origin instead of relative to another block.
The functions using the various label margins should only be used if this non-pure behavior is desired; labels are generally better placed using the pure functions described in Labels.

Source: show/hide visit
putblockOrigin
•dst::§•Group newBlock::§Drawable §Drawable
Simply tacks newBlock to •dst, and then returns newBlock. This function is typically used to place the first block added to the block diagram, but may also be used in other situations when manual tweaking is required to get a block in the right location. In the latter case, this function is called with an object which has already been shifted to the right location; applying the shift to the result of calling this function would be meaningless, since the un-shifted object would already have been added to •dst then.
Although this is a very simple task, use of this function makes the code more homogeneous.
putblockLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable dist::§Length §Drawable
This function is considered low-level; the user should prefer functions which call this function with standardized values for dist instead.
Positions newBlock to the left of oldBlock, such that the horizontal distance between the bounding boxes equals dist. The vertical positioning will make the origin of newBlock level with the vertical midpoint of oldBlock's bounding box.
See also:putblockVeryNearLeft putblockNearLeft putblockLabelSpaceLeft putblockFarLeft putblockVeryFarLeft putblockLabelMarginLeft
putblockRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable dist::§Length §Drawable
Analogous to putblockLeft
See also:putblockVeryNearRight putblockNearRight putblockLabelSpaceRight putblockFarRight putblockVeryFarRight putblockLabelMarginRight
putblockAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable dist::§Length §Drawable
Analogous to putblockLeft
See also:putblockVeryNearAbove putblockNearAbove putblockLabelSpaceAbove putblockFarAbove putblockVeryFarAbove putblockLabelMarginAbove
putblockBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable dist::§Length §Drawable
Analogous to putblockLeft
See also:putblockVeryNearBelow putblockNearBelow putblockLabelSpaceBelow putblockFarBelow putblockVeryFarBelow putblockLabelMarginBelow
putblockVeryNearLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockNearLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelSpaceLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockFarLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryFarLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelMarginLeft
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockLeft with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryNearRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockNearRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelSpaceRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockFarRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryFarRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelMarginRight
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockRight with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryNearBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockNearBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelSpaceBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockFarBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryFarBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelMarginBelow
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockBelow with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryNearAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockNearAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelSpaceAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockFarAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockVeryFarAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.
putblockLabelMarginAbove
•dst::§•Group newBlock::§Drawable oldBlock::§Drawable §Drawable
Dynamic references:none
Calls putblockAbove with the distance argument given by the dynamic variable corresponding to the name of this function.

Connection points

A basic design choice of this extension is to use a plain §Drawable object to model a block. Hence, the points where connections attach to a block is not part of the object representation itself. Instead, a standardized way of selecting points on the bounding box is provided.
A connection point is specified by selecting one of the four sides of a block (by calling the appropriate function), the total number of connection points on that side, and the index of the current point. Thanks to the use of default values, it is often sufficient to only select the side of the block; then the mid-point of that side will be selected.
Connection points
Angry
How to select points on a block where connections attach. Note that it is assumed that the block is rectangular, so that the rectangular bounding box follows the contour of the object; this is why summation blocks can only be used with one connection on each side. Also note that the provided numbers shall be floats, nor is the index required to be in the range from 1 to the total number of points, but use these freedoms with caution!

Source: show/hide visit
leftpoint
•pic::§•Drawable n:1::§Float i:1::§Float §Coords
Select a point on the left side of the rectangular bounding box of pic, selecting point number i among a total of n on this side.
rightpoint
•pic::§•Drawable n:1::§Float i:1::§Float §Coords
Analogous to leftpoint.
bottompoint
•pic::§•Drawable n:1::§Float i:1::§Float §Coords
Analogous to leftpoint.
toppoint
•pic::§•Drawable n:1::§Float i:1::§Float §Coords
Analogous to leftpoint.

Connections

These functions are, for the same reason as the layout functions (see Layout), non-pure. One difference, though, is that instead of returning the painted path, only the §Path object itself is returned. The reason is that the path is much more useful for further operations, such as putting labels along it.
While the most high-level functions take entire blocks as arguments and assume that there is just one connection point on each side of a block, the more low-level functions take the connection points as arguments, allowing the user to select the point using the functions in Connection points.
In most situations, connect is able to figure out the path from the blocks being connected alone, and in these cases this function should be used. In most cases when connect picks the wrong path, this is because it makes the connection to the wrong sides of the blocks, and then functions such as brconnect (connect the bottom side of the first block with the right of the second block) come in handy. These functions will still be insufficient if the path shall connect, say, a bottom side to another bottom side, since they cannot figure out the vertical coordinate for the horizontal part of such a path. Then the most low-level functions, such as vvconnect (construct a path with is initially vertical and vertical at the end as well), are required. It is only the most low-level functions that operate on points rather than blocks.
So, there were three levels of functions, and they are presented in order low to high. The listing of the functions on each level is preceded by an example..
Connection primitives
Angry
These are the primitive functions that construct connection paths. They operate on points, and are named after the direction at the beginning and end of the constructed path, for instance hvconnect constructs a path that is horizontal at the beginning and vertical at the end. If the path shall begin and end along the same axis, the user must also tell at which coordinate the beginning and end shall connect with each other. This is done using a pair of mediation and slide values; the mediation is a linear interpolation between the start (mediation is 0) and end (mediation is 1) points, and the slide is an absolute length added to the coordinate given by the slide.

Source: show/hide visit
vhconnect
•dst::§•Drawable pa::§Coords pb::§Coords §Path
Dynamic references:none
Constructs a path from pa to pb which consists of two line segments; first a vertical and then a horizontal. Besides returning the path, it is painted using @connectpainter with ..Shapes..Traits..@width being set to @connectionlw, and the resulting §Drawable is added to •dst.
hvconnect
•dst::§•Drawable pa::§Coords pb::§Coords §Path
Dynamic references:none
Analogous to vhconnect; just exchange horizontal and vertical in the description.
hhconnect
•dst::§•Drawable pa::§Coords pb::§Coords mediation::§Float slide::§Length §Path
Dynamic references:none
Constructs a path from pa to pb which consists of three line segments; initially horizontal and horizontal also at the end. The horizontal coordinate of the vertical line segment in the middle is given by the mediation and slide values. The mediation is relative to the horizontal coordinates of pa and pb, while the slide enters the coordinate as a term. See the example for illustration!
Besides returning the path, it is also painted to •dst, just like vhconnect does.
vvconnect
•dst::§•Drawable pa::§Coords pb::§Coords mediation::§Float slide::§Length §Path
Dynamic references:none
Analogous to hhconnect; just exchange horizontal and vertical in the description.
Connection intermediate level functions
Angry
These are the intermediate level functions that construct connection paths. They operate on blocks, and are named after the blocks' sides at the beginning and end of the constructed path, for instance rbconnect constructs a path from the right side of the first block to the bottom side of the second block. If the path shall connect to the same side of the two blocks, the user must also tell how far from the closest block the path shall turn.
When the underlying primitive function being used is vvconnect or hhconnect the mediation parameter is 0.5 and the slide zero.

Source: show/hide visit
trconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Calls the appropriate low-level function to create a path from the top of the first block to the right side of the second block.
tlconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
brconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
blconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
ltconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
lbconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
rtconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
rbconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Analogous to trconnect.
tbconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable mediation:0.5::§Float slide:0 cm::§Length §Path
Dynamic references:none
Calls the appropriate low-level function to construct a path from the top of the first block to the bottom of the second block. The mediation and slide values are simply passed on to the low-level function.
tbconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable mediation:0.5::§Float slide:0 cm::§Length §Path
Dynamic references:none
Analogous to tbconnect.
lrconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable mediation:0.5::§Float slide:0 cm::§Length §Path
Dynamic references:none
Analogous to tbconnect.
rlconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable mediation:0.5::§Float slide:0 cm::§Length §Path
Dynamic references:none
Analogous to tbconnect.
ttconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable slide::§Length §Path
Dynamic references:none
Calls the appropriate low-level function to construct a path from the top of the first block to the top of the second block. The slide value is simply passed on to the low-level function, and the mediation value is chosen as the reasonable choice of 0 or 1.
bbconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable slide::§Length §Path
Dynamic references:none
Analogous to ttconnect.
llconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable slide::§Length §Path
Dynamic references:none
Analogous to ttconnect.
rrconnect
•dst::§•Drawable pica::§Drawable picb::§Drawable slide::§Length §Path
Dynamic references:none
Analogous to ttconnect.
Connection by automatic choice
Angry
The function connect makes an automatic selection among the intermediate level functions. Note that the first block's left and right sides are preferred to its bottom and top sides, and that one never obtains a path which connects to the same side of both blocks. Hence, only eight of the intermediate level functions are accessed through connect.

Source: show/hide visit
connect
•dst::§•Drawable pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Makes an automatic selection among the intermediate level connection functions. See Connection by automatic choice.

Labels

Layout of labels
Angry
Functions used to position labels relative to a given point. That these functions do take the point to be labeled as an argument counteracts separation of concerns, which would require that these function only position labels relative to the origin. However, it is very convenient to incorporate the shift in the functions, and in case one doesn't want the shift, one may always pass the origin.
Or make a new design where the point defaults to the origin…
Note how the vertical positioning is independent of the vertical extent of the label. This ensures that labels with different vertical extent still end up on the same baseline if the points they label are level.

Source: show/hide visit
putlabelLeft
lbl::§Drawable z::§Coords y::§Length §Drawable
Dynamic references:none
Position lbl to the left of z, centering vertically at y. For instance, y=1 gives a label below z, while -1 gives a label above.
See also:..Shapes..Layout..Xcenter_y
putlabelRight
lbl::§Drawable z::§Coords y::§Length §Drawable
Dynamic references:none
Analogous to putlabelLeft.
See also:..Shapes..Layout..Xcenter_y
putlabelBelow
lbl::§Drawable z::§Coords x::§Length §Drawable
Dynamic references:none
Position lbl below z, treating the label as if it had the height of an X, centering horizontally at x. For instance, x=1 gives a label to the left of z, while -1 gives a label to the right.
See also:..Shapes..Layout..Xcenter_y
putlabelAbove
lbl::§Drawable z::§Coords x::§Length §Drawable
Dynamic references:none
Position lbl above z, centering horizontally at x. For instance, x=1 gives a label to the left of z, while -1 gives a label to the right.
Get Shapes at SourceForge.net. Fast, secure and Free Open Source software downloads