Rotating an object

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
Rotation axis points for a symbol 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:
  1. In the Symbol Editor, create a new symbol.
    For more information, see Making a new symbol.
  2. Import image bamdial.svg from the directory <installdir>/jviews-diagrammer89/bin/symboleditor/data/examples.
    The SVG image creates an SVG object . For more information, see Importing a vector graphic.
  3. Delete the Text and Shape Objects.
    SVG is now the base object.
  4. Create a float parameter called progress.
    For more information, see Creating a new parameter.
  5. Ungroup SVG.
    For more information see Converting SVG images to symbols.
  6. In the Symbol Outline pane, select the pointer object (General Path 6) and rename it pointer.
    See figure The gauge symbol to see the pointer object.
  7. Select the Transform tab in the Styling Customizer.
  8. Click the Bind button next to the Angle field.
  9. Set the Parameter field to progress.
  10. Enable Compute the transformation according to the following min/max values.
  11. Set the following values:
    • Parameter Min: 0
    • Parameter Max: 100
    • Value Min: 0
    • Value Max 110.0. This is the maximum rotation for pointer.
  12. Click OK.
  13. Set the Center field to BottomRight.
  14. Save this symbol as gauge in a gauges category in the bampalette.
    For more information, see Saving a symbol.
  15. Test your symbol.
    You will see that the pointer rotates in function of changes in the value of progress.
diasym_gague9.png
The gauge symbol