![]() |
|
tgnsplit |
Longname: | t g raphic n umber split | ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Released: | not available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created: | not available | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See also: | tgncopy |
Summary |
Splits a selected shape into sections, horizontally, vertically, or both. The precise behaviour of tgnsplit depends on what sort of shape is selected. The results for boxes, circle and grouped objects being very different. |
Example extract |
The macro below splits a box shape measuring 100mm×50mm into four equal-sized smaller boxes measuring 25mm×50mm: The example below creates one box 40mm×50mm and 3 boxes 20mm×50mm: Percentage-size and proportional components can be used together: The example below expands the box from the top left: The example below sets the box size from the top left: From these last examples it can be seen that if there are no proportional components then the overall size of the new box(es) can be different to the original box size.
|
Syntax
|
num cols:n ?ratio:n
)num rows:n ?colour:c ?
|
num cols:n |
The number of rows into which to split the shape vertically. |
ratio:n |
The proportion in which each column would relate to each other. The ratio proportion can consist of up to three components; a proportional component, a fixed-size component, and a percentage-size component. Each ratio portion will have its components separated by + signs. Fixed-size components must have a suffix indicating the units to be used (mm, in, pt, etc). The default units of measurement do not apply because in this case numbers without a suffix are treated as proportional components. |
num rows:n |
The number of rows into which to split the shape horizontally. |
colour:c |
The names of one or more colours to apply to each split, in order from the top left box to the bottom right box moving from left to right. If the number of boxes exceeds the number of colours specified the colour sequence will automatically be repeated until all the boxes are filled. |
![]() |
When a group of objects is selected tgnsplit can be used to make multiple copies of the entire group within the bounding box of the original. This can be a good way of making patterns such as borders. The macro shown was used to turn the group object on the left into a border pattern (the centre groups were then selected and cut): |
|
tgnsplit can also be used to scale a selected graphic shape, e.g. the macro shown below simply scales the selected shape to 50 per cent of its size. This does not work on circles or ellipses, which should be grouped with tggroup before being scaled in this way. |
|
Document created on 08-Feb-2003 (revision 1)