scale="1.0" 			// double, min 0.8, max 1.2
    mirror="none" 			// none, horizontal, vertical, both
    rotation="0" 			// +/-, rotation angle in degrees 
    dx="0.0" 			        // double, in mm from location top-left
    dy="0.0" 			        // double, in mm from location top-left

Each decoration is accompanied by the specification of a transform. Using this transform, the API will transform the original decoration according to the following order:

  • Scale around decoration centre.
  • Mirror horizontally, vertically or both
  • Rotate around decoration centre
  • Translate right/down from the top-left corner of the decoration.

The scale parameter can range from 0.8 to 1.2. This enforces the rule that scaling of embroidery should be restricted to 20% up or down.

The mirror parameter string can be one of “none”, “horizontal”, “vertical”, “both”

The rotate parameter is an angle in degrees. Positive angle is clockwise rotation, negative angle is counterclockwise rotation.

The translation parameter is in mm. The origin of translation is the top-left corner of the location. The positive x-direction is to the right. The positive y-direction is down. Note that it is the responsibility of the client to make sure that after the decoration is transformed, its bounds are still inside the location rectangle.