Rotation is when an object turns clockwise
or anti-clockwise on an axis you define. Like changes to the size
or position of an object, the degree of rotation is set in the
following ways:
- Manually using the Transform tab in the Styling Customizer.
- Automatically by binding the object to a parameter.
Using rotation, you can create an
alternative graphic representation for real time change.
The axis on which an object rotates is chosen by setting the Center field in the Styling Customizer.
The following figure shows the different axis points that can be
defined on an object.
![diasym_align8.png](../../JViews_Diagrammer/usrsymboldiag/_media/diasym_align8_default.png)
Rotation axis points for a symbol
object
Note
The axis is set on the bounding box of an
object, that is, the smallest rectangle containing all parts of
the object.
Setting the Angle field in the
Styling Customizer to a positive value rotates the object
clockwise, a negative value rotates anti-clockwise.
To create a rotating object in an
imported SVG image:
-
In the Symbol Editor, create a new symbol.For more information, see Making a new symbol.
-
Import image
bamdial.svg
from the directory <installdir>/jviews-diagrammer810/bin/symboleditor/data/examples.The SVG image creates an SVG object. For more information, see Importing a vector graphic. -
Delete the Text and Shape Objects.SVG is now the base object.
-
Create a float parameter called
progress
.For more information, see Creating a new parameter. -
Ungroup SVG.For more information see Converting SVG images to symbols.
-
In the Symbol Outline pane, select the pointer object (General Path 6) and rename it to
pointer
.See figure The gauge symbol to see the pointer object. -
In the Styling Customizer, click the Transform tab .
-
Click Bind next to the Angle field.
-
Set the Parameter field to progress.
-
Select the Compute the transformation according to the following min/max values check box.
-
Set the following values:
- Parameter Min: 0
- Parameter Max: 100
- Value Min: 0
- Value Max: 110.0. This is the maximum rotation for pointer.
-
Click OK.
-
From the Center list, select Bottom Right.
-
Save this symbol as
gauge
in a gauges category in the bampalette.For more information, see Saving a symbol. -
Test your symbol.You will see that the pointer rotates according to changes in the value of
progress
.
![diasym_gague9.png](../../JViews_Diagrammer/usrsymboldiag/_media/diasym_gague9_default.png)
The gauge symbol