|Rotated Rectangles in Helix 7.0|
One of the new features in Helix 7.0 is the ability to rotate rectangles on a template. This feature was added at the request of a Helix user, who was willing to underwrite a large portion of the development costs. (Thank you!)
This technote provides details regarding the implementation of this feature, and the current restrictions. If you have suggestions for making this feature better, please let us know.
Rotation can be applied to data rectangles and label rectangles. (Command, group, and subform rectangles can not be rotated.) When a data or label rectangle is selected, the ‘Rotation’ property appears in the Inspector, right below the ‘Background color’ property
The ‘Rotation’ property can also be edited via AppleScript. See the scripting dictionary entries for data and label rectangles for more information.
Rotation is around the top/left corner. The Inspector (and AppleScript) Location properties are unchanged regardless of rotation angle. Tabbing order on the template is based on the position of the top left corner of the rectangle.
Rotation precision is accurate to 1/100 of a degree, with a valid range of ±180.00 (Positive is clockwise.) Entering values outside this range can produce unexpected results.
Rotation is set by typing into the ‘Rotation’ property in the Inspector. Rotation can also be done via keyboard, using Control-Arrow keystrokes. One keypress equals 1 degree. Holding the Option key down changes the precision to 0.01 degree, and Control-Escape resets the rectangle to 0 degrees.
Rotated rectangles are drawn in the background layer, behind even background label rectangles. This stacking order also applies to printing.
Rotated rectangle that are partially off the template are clipped at the template edges.
|Rectangle Position and Lists||
When a repeat rectangle is present on a template (i.e: a list) non-background rectangles can be used to constrain the list to a limited area of the template. In past versions of Helix, the intersection of any part of a rectangle outside the repeat rectangle constrained the repeat rectangle’s travel. In Helix 7.0.1 and later, only the upper left corner of an outer rectangle is considered when restricting travel.
This has design advantages in that it allows more flexibility of placement without impacting the repeat rectangle. The one potential issue is a rectangle whose top and left edges are below and to the left of the repeat rectangle, but the rectangle’s width is such that it overlaps with the repeat rectangle’s travel. In this case prior versions of Helix would block list travel, but Helix 7.0.1 and later do not. If this is an issue, add an empty label rectangle below the repeat to block the travel.
Travel restrictions for existing templates will be unchanged until the template is edited. When committed, the template is re-evaluated and the new positioning rules will be applied to determine list travel restrictions.
For a data rectangle to allow rotation, it must contain only an abacus. A field can be included if the rectangle’s editable (‘Allow edit’), clickable (‘Allow click’), and tabbable (‘Allow tab’) properties are all false. Rectangles in a list are none of these things, so they rotate regardless of the state of the properties.
Data rectangles containing Picture and Document data types can not currently be rotated.
Data rectangles containing control elements (checkboxes, radio buttons, popups) can not be rotated.
Label rectangles containing Picture data can not currently be rotated.
Entering a rotation angle in a rectangle that does not meet these criteria is allowed, but the rotation is ignored. In this situation, the label of the ‘Rotation’ property is highlighted in yellow, as seen in the image at right. The conflict can be resolved by turning off the appropriate ‘Allow…’ properties, or by resetting the rotation angle to 0.
This feature will be expanded to include additional data types, and possibly rectangle types in the future. If you have a specific request, please contact us.