Objects having a shape can be assigned with one or more stroke styles used to draw the outline of the shape. The stroke style determines the width and other attributes of drawing a shape outline. Strokes can be used to draw outlines for groups with clipping shapes, individual characters in a vector text or outlines of glyphs of a text in a frame.
When drawing a stroke of an outline, a fill style is used to fill the region covered by the stroke. Typically, this fill style is a solid color, picked from the color panel, but all fill types are supported as a fill style of a stroke region. This means that an outline stroke can be drawn using gradient, tiling pattern or noise styles as well.
When drawing an outline stroke with a gradient, the Stroke gradient attribute can be used to determine how to draw the colors of the gradient. When drawing in Normal mode, the gradient is filling the region covered by the stroke as it would be a regular shape. With the Across Stroke mode, the gradient colors are drawn in parallel with the outline shape. With the Along Stroke mode, the gradient colors are drawn along the outline shape.
The fill style of a stroke outline can be selected from the corresponding fill type panels (color, gradient, pattern or noise fill panels), from the stroke panel, or from the Appearance panel.
A stroke style of an outline, may have its own opacity and transparency settings. These can be set from the Appearance panel.
Stroke attributes are used in various places of a VectorStyler document:
- Outlining shapes of objects.
- The Outline shape effect to set the effect attributes.
- Drawing the tiling grid in a tiling pattern fill.
- The contour effect.
- Text decorations: underline, over line, strike through.
A stroke appearance is defined using a set of attributes, described in the sections of this chapter. The following attributes are available when setting up a stroke style to outline a shape:
The width of the stroke is the primary attribute of a stroke style. It is the most commonly adjusted attribute in typical illustrations, drawings or artwork.
In VectorStyler, the width of a stroke can be set to 0, resulting in a true hairline, a thin line that uses the minimum possible width in any rendering resolution or zoom. In cases of sub-pixel rendering (anti-aliasing), the hairline is rendered as a part of a pixel.
The width of the stroke can also be controlled using the calligraphic stroke shape by setting the stretching and direction of the nib shape. Alternatively (or in combination with calligraphic nib shapes), the width can be controlled using variable width stroke profiles.
The alignment of the stroke can be set to an arbitrary distance from the actual outline shape, both inwards or outwards from the closed shape, or on either side of an open shape. The stroke alignment can be set relatively to the stroke width, or in absolute values as a distance from the outline shape.
The corner shape of a stroke, determines how the cusp corners are drawn when a stroke with non-zero width is rendered.
The stroke cap shape is at the ends of the stroke for open outlines, or dashed segments.
In VectorStyler, the stroke cap shape can be customized using arbitrary shapes. A set of predefined stroke cap shapes are provided. New stroke cap shapes can be created using any object shape, as a cap preset, cap style or cap shape reference. The start and end of an open path (or dash segments) can be assigned with different cap shapes.
Selecting and creating stroke caps is described in the Stroke Caps section.
Stroke arrow heads are used to decorate the start and end of open paths (leaving the internal dash endings to caps).
In VectorStyler, stroke arrows can be created from any object shape. The arrow is a shape that uses the same fill style as the stroke. A set of predefined arrowhead shapes are provided with the application. New stroke arrow shapes can be created also by using references to object shapes. When references are used, the arrow shape is linked to the object shape and changes on the object shape are automatically reflected on the arrow shape.
Selecting and creating stroke arrows is described in the Stroke Arrows section.
Stroke dashes are used to break a shape into multiple small segments called dashes. Stroke dashes can be set up by specifying the lengths for the segment and spacing parts either in absolute units, or relative to the stroke width. Stroke dashes can be aligned to cusp shape corners by stretching the segment and space lengths.
In VectorStyler, stroke dashes can be edited visually in the stroke dash selector view, by adjusting the segment and gap boxes using the mouse. Stroke dashes can be saved as presets or styles and reused independently of other stroke attributes. Stroke dashes used on an object can be referenced using the Stroke Dash Style object role, and used to style other strokes as well. When changing a referenced stroke dash, all uses of that dash style are automatically updated.
Selecting and creating stroke dashes is described in the Stroke Dashes section.
Stroke stripes separate a stroke into multiple parallel shapes with user defined widths and spacing. Stroke stripes can be created by defining the width and gap amounts relative to the stroke width. Stroke stripes are generated using curve offsetting, in a similar way as the stroke alignment is generated. This will result in multiple filled regions of a stroke. Stroke stripes can be freely combined with stroke dashes and variable width stroke profiles.
In VectorStyler, stroke stripes can be edited visually in the stroke stripe selector view, by adjusting the width and gap amounts. Stroke stripes can be saved as presets or styles and reused independently of other stroke attributes. Stroke stripes can also be referenced from an object using the Stroke Stripe Style role, creating a dynamic link to the stroke stripe style.
Selecting and creating stroke stripes is described in the Stroke Stripes section.
The variable width stroke profile is used to control and vary the width of the stroke along the shape. Variable width profiles can be used to create stroke outlines simulating brush paints of varying pressure and width. The variable width profile is adjusted, by setting the widths and different locations along the shape.
In VectorStyler, the variable width profile can be edited interactively on the outlined object using the Width tool. The width variation can be symmetric (by default) on the two sides of the stroke, or can be set to different width amounts.
Selecting and creating variable width profiles is described in the Stroke Profile section.
Styling and References
The stroke attributes as a whole can be saved as presets or styles and reused to style multiple objects. Creating and using stroke styles enables the dynamic linking of stroke settings of objects to a single style definition. When the style is edited, all objects using the stroke style are automatically updated.
Stroke styles can be defined using object references, by enabling the Stroke Style role for a named object. When using object references as stroke styles, changes to any of the stroke attributes of the referenced object are reflected in all uses of the stroke style.
Some attributes of the stroke settings can be individually styled, independently of other attributes. These are the start and end caps, start and end arrows, the dash, stripe and profile settings. This includes using object references with the corresponding role (cap, arrow, dash, stripe, profile styles) to link to the stroke attribute of a named object.
The shape of a stroke cap and arrow can be linked to an object shape so that the cap and arrow are automatically updated as the object shape changes. This can be done when creating new stroke cap or arrow styles (but not for presets) by enabling the Link to Object option.
Expanding the Stroke
The outline of an object rendered with a set of stroke attributes forms a region that is filled with a fill style (color, gradient, pattern or noise). The shape of this region depends on the shape of the object, the stroke width and alignment, and all of the other attributes of the stroke.
The region covered by the stroke can be converted into an editable path object using the Expand Stroke command from the Style menu. Depending on the stroke attributes of the object, this may result in one or two objects, with a shape matching the stroke area and filled with the fill style previously used to render the stroke.
When expanding a stroke, the resulting path approximates the stroke area as close as possible, while using as few as possible extra nodes. The current zoom level is used to control the precision of stroke expansion depends on the current zoom level. With higher zoom levels resulting in more precise expansion, while smaller zoom levels resulting in less extra nodes.