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:
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.
Note
The axis is set on an object´s bounding box, that
is, the smallest rectangle containing all parts of an 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.
-
Import image bamdial.svg
from
the directory <installdir>/jviews-diagrammer89/bin/symboleditor/data/examples.
-
Delete the Text and Shape Objects.
SVG is now the base object.
-
Create a float parameter called progress
.
-
-
In the Symbol Outline pane, select the pointer object
(General Path 6) and rename it pointer
.
-
Select the Transform tab in the Styling Customizer.
-
Click the Bind button next to the Angle field.
-
Set the Parameter field to progress.
-
Enable Compute the transformation according
to the following min/max values
.
-
Set the following values:
-
-
Set the Center field to BottomRight.
-
Save this symbol as gauge
in
a gauges category in the bampalette.
-
Test your symbol.
You will see that the pointer rotates in function of
changes in the value of progress
.