In VectorStyler, the shape of linear, concentric and conical gradients can be set to any suitable open (linear, conical) or closed (concentric) shape or path. The shape used in the gradient can be set from a shape preset or style, or from reference objects with the proper shape role. New gradient shape presets and styles can be created from object shapes using commands from the Gradient panel menu.
In the gradient examples shown above, custom shapes were used to create various gradient forms:
- (A) a linear gradient shape using a a curve with three segments.
- (B) a linear gradient shape using a zigzag path consisting of lines.
- (C) a concentric gradient using a rectangle shape.
- (D) a concentric gradient using a rhombus shape.
- (E) a concentric gradient using a pentagon shape.
- (F) a conical gradient shape using a path consisting of two cubic curves.
Selecting the Shape
A number of predefined gradient shape presets that are provided with VectorStyler can be selected from the Shape field in the Gradient preset panel. The Shape field contains the basic gradient shape types, and the list of gradient shape styles and presets. New gradient shape styles and presets can be defined using commands from the panel menu.
To select an existing gradient shape style or preset:
- Open the Gradient panel from the Panels menu.
- Select the object with the gradient, or apply a gradient to a selected object.
- Click on the drop box at the Shape field in the gradient panel.
- A hierarchical menu is opened, containing the gradient shape types and existing styles and presets.
- Select a gradient shape from the list.
- The gradient shape is applied to the selected object as a fill, stroke or transparency gradient.
The gradient shape can also be selected from the gradient shape specific options for linear, concentric and conical gradients. The middle section of the gradient panel contains the gradient shape specific properties. When a linear, concentric or conical gradient is selected, a Shape field is shown in the middle section.
The Shape field, from the middle section of the gradient panel, opens a list of shape styles and presets, suitable for the current gradient shape type. Select a shape from the list to change the geometry of the selected gradient.
Gradient Shape Tool
The Gradient Shape tool can be used to directly edit the shape of a linear, concentric or conical gradient. The Gradient Shape tool can be found in the application tool box, by opening the Gradient tool.
When the gradient shape tool is activated, the shape of the gradient in the selected object is shown as an editable path. The editing options are the same as in the case of the Node tool. Changes made to the shape are reflected on the gradient rendering.
Creating New Shapes
To create new gradient shapes that can be used as linear, concentric or conical shapes, follow these steps:
- Draw an object with a shape that will be a gradient shape.
- For linear and conical gradients, draw a single open shape.
- For concentric gradients, draw a single closed shape.
- To create a linear gradient shape preset, select the Create Linear Shape Preset.
- A gradient shape options view is shown, with content specific to the gradient shape type. Set the gradient shape options and press Ok to create the preset or style.
- To create a linear gradient shape style, select the Create Linear Shape Style.
- To create a concentric gradient shape preset, select the Create Concentric Shape Preset.
- To create a concentric gradient shape style, select the Create Concentric Shape Style.
- To create a conical gradient shape preset, select the Create Conical Shape Preset.
- To create a conical gradient shape style, select the Create Conical Shape Style.
When creating and using a style, the changes to the style are updated in all gradient shapes that use the style.
When creating a gradient shape preset or style, a gradient shape options view is shown. The content of this view depends on the gradient shape type (linear, concentric or conical), and it is the same as the shape section described in the Gradient Selector view. The preset and style creator views contain a preview of the gradient using the new gradient shape. A gradient color can be selected to show the shape preview with different colors, but this color is not saved with the gradient shape preset or style.
When creating a gradient shape style, a Link to Object check box is shown in the gradient shape options view. This check box enables or disables the linking of the gradient shape to the object shape. When enabled, modifying the object shape will automatically update all gradients using the new gradient shape. Styles are only stored with the document, while presets can be stored outside of the document. Therefore, the linking to the source object of the shape can be enabled for styles only, but not for presets.
Gradient shapes can also be defined by setting up a reference object with a gradient shape type role. A reference object with specific role is defined by setting a name for the object and selecting an object role. The advantage of using reference objects for gradient shapes, is that any changes made to the object shape will immediately reflect on all gradients using the object shape. Using reference objects for gradient shapes, does not require the creation of a preset or style.
To setup a reference object as a gradient shape follow these steps:
- Draw or select an object with a shape suitable to be used as a gradient shape.
- For linear or conical gradients, the shape must be a single open path.
- For concentric gradients, the shape must be a single closed path.
- Select the Object Options command from the Object menu.
- Set the object name and select the gradient shape role from the menu opened with the Role button.
- For linear gradient shapes, select the Linear Gradient Shape role.
- For concentric gradient shapes, select the Concentric Gradient Shape role.
- For conical gradient shapes, select the Conical Gradient Shape role.
- Confirm the object options by pressing Ok.
- A new gradient shape with the object name and shape is shown in the gradient panel shape list.
- Use the new gradient shape on objects with gradients.
- Editing the original object shape with the Node tool or the Shape panel will automatically update all gradient shapes referencing to the object.
Using Multiple Shapes
The linear, concentric or conical gradient type custom shape can be defined using multiple shapes, positioned along the gradient direction. When using multiple shapes, the geometry of the gradient blends from one shape position to another shape.
The positioning of multiple shapes, depends on the gradient type.
- For linear gradients, the shapes are positioned along the gradient axis.
- For concentric gradients, the shapes are centered at the gradient center and scaled to the radius set by the shape position.
- For conical gradients, the shapes are positioned around the gradient center, at angles set by the shape position.
Multiple shapes can be selected in the Gradient Selector view, or when creating or editing a gradient shape preset or style. The views used in these cases contain the detailed options of a gradient shape type (shown for a concentric gradient below).
To setup a gradient shape using multiple shapes, follow these steps:
- Draw multiple objects, each with a shape that will be used in the gradient shape definition.
- Setup the object roles to Shape role, if the objects are references.
- Create shape styles or presets from the objects, using the Shape panel, if styles or presets are used instead of object references.
- Edit the gradient options, by selecting the Edit Gradient command from the gradient panel menu.
- Use the button to add a new gradient shape stop.
- The list of existing gradient shape stops and their positions are shown in the Stop field.
- Select the gradient shape stop to be edited from the Stop field.
- Set its position in the Place field. The interpretation of the position depends on the gradient type.
- Select the shape at this shape stop from the Shape field.
- To remove a gradient shape stop, use the button.
- The gradient geometry is determined by transitioning from one shape to another, with the shapes fixed at the selected positions.