Lines, Labels, Shapes

Line segments, single-line text labels, and shapes are three of the simplest building blocks that comprise a FypML figure.  They are typically added as children of the two primary "container objects" in FypML's element hierarchy -- the figure node and the graph node.

The screenshots on the right show the layout of the property editor panel for: (1) a vertical solid line segment extending from (3,0) to (3,6) with respect to its parent container (in inches) and drawn with a solid 0.005-in wide black stroke; (2) the text label "Courier bold 24pt, green" centered both horizontally and vertically at (79.3%, 82.6%) in its parent container; (3) and a 1-in square centered at (1.5, 3.6) in its parent container, outlined with a solid white 0.04-in wide stroke, filled with yellow-to-blue radial gradient, and containing the word "RADIAL" at its center. 

The attributes defining each object type are very straightforward. Each has some or all of the common node style properties exposed in widgets in the bottom two or three rows of the editor panel. Note that the text label node lacks any stroking properties; in FypML, text glyphs are filled using the text/fill color; stroking of glyph outlines is not supported in Figure Composer.

You might be wondering why a line node or shape node possesses any text-related styles. A shape node can have a centered label, so the text styles govern the appearance of that label. A line node draws no text, but it can serve as a somewhat unusual container for label, shape and other line nodes; for example, you can adorn a line segment's endpoints with arrow symbols, and then add text labels at each endpoint. Since both shape and label nodes have text style properties, the parent line node must also.

Note that both the label and shape nodes possess a "rotation angle" property, θ. Typically set to 0, this property sets the orientation of a graphic object with respect to its parent container. It is restricted to a range of [-180 .. 180] degrees, with a positive value corresponding to a counter-clockwise rotation. For example, if a label node has θ=-30. then the rendered label will lie along a line descending from left to right at an angle of 30 degrees from horizontal.

A label node has both horizontal (left, right, center) and vertical (top, bottom, middle) alignment properties, while a shape node includes the shape type and size. A variety of different shapes are supported. Many are closed shapes (circle, box, diamond, kite, dart), some are not (star, tee, xhair, arrow), and some are intended to adorn the endpoints of line segments or error bars (linethru, bracket, arrow, thinarrow, widearrow). The path that defines each shape type is specified with respect to a unit "design box" and scaled in accordance with the shape object's size property.

(As of V4.7.2) The shape node, unlike the line and label objects, possess a background fill property, which is displayed and edited by the button-like widget in the top-right corner of the Shape Properties editor. This property is applicable only to closed shapes like circles, diamonds, and the like. Three fill styles are supported: (1) a solid color fill; (2) an axial gradient; or (3) a radial gradient. The gradient fills are defined such that a single cycle (from the first "color stop" to the second) spans the bounding box of the shape. The color of the solid fill may be opaque, translucent, or transparent; while the color stops for the two gradient fills are always opaque. The background fill widget is described in more detail here.

Finally, note the field labeled "ID (optional)" in the Text Label Properties editor. The notion of a "graphic object ID" was introduced in version 4.6.2 for select object types: text labels, text boxes, and graphs. If the ID is a non-empty string, it serves to uniquely identify the label, text box, or graph among all the graphic objects that comprise a figure. The ID is never rendered in any way. It is really intended for use outside of Figure Composer --it provides a way to programmatically locate a particular label, text box or graph within an existing FypML figure, so that you can modify the content of the label or text box, replace the graph with a different one, and so on. If you have no need for the object ID, simply leave it blank.

Line, Label, and Shape Property Editors