Compounds
Description
Compounds is generated by using the "Compound" option. The Compound option is added after the
action. Compound parameters are added after a ? character which is appended to Compound.
For example: /1/Render/Compound?Elements[0]=Designs/MyDesign.PXF&Elements[1]=Lettering%3fText=ABC
Parameters
-
Recipe - Recipe to use when generating the text. Default is "Normal".
See list of available recipes.
- Recipe Note: See render or generate which will apply a recipe on top of any existing
-
MachineFormat - Machine format to use when generating the text. Default is "Tajima".
See list of available machine formats.
-
Elements[] - Array of design components. Values are URL encoded design components such as
- Lettering see Lettering Note below
- Lettering can be transformed.
- OffsetX - X directional offset to move the component. Positive values are to the right. Default is 0.
- OffsetY - Y directional offset to move the component. Positive values are down. Default is 0.
- These offset values are only supported when the Layout type is ltAbsolute. See below for the Layout parameter and the supported types.
- See transformation parameters for information about the offsets and additional transformation parameters.
- Lettering can support setting the values of the baseline. For Compounds, we support the X1 and Y1 from the baseline.
- X1 - X-value of the first point of the baseline.
- Y1 - Y-value of the first point of the baseline.
- For OffsetX and OffsetY, if X1 and/or Y1 is specified from the baseline, then the offset values will be ignored.
- For baseline parameters, see Lettering for more information.
- a Design
- a request to Autodigitize an image
Nesting compounds is not permitted.
See arrays for more information about specifying array values.
-
Palette[] - Array of palette colours. Values are RGB sextuplets (eg. FF0000 is red).
See arrays for more information about specifying array values.
-
Needles[] - Array of needle indices. Values are 0-based indexes into the design's palette.
See arrays for more information about specifying array values.
- Needles Note: Setting the Needles[] in the Compound will override any needles set in the Designs or Lettering elements of the Compound
-
Colours[,,] - Array of palette colours. Values in the array section are:
- Index of the Element that is being passed. See Elements[] above. Values are 0-based indexes into the Elements[] array
- Example: Elements[1]=Lettering to change the second colour in the palette for this element Colours=[1,1,00CC00]
- Index of the colour to change in the palette. Values are 0-based indexes into the design's palette
- Colour in hex form. RGB sextuplets (eg. FF0000 is red)
- Example: Compound?Elements[0]=Designs/BaseballTemplate.PXF&Elements[1]=Lettering?Text=PULSE&StackedSpacing=254&Layout=ltStackedVertical&Colours=[0,4,0000DD]&Colours=[1,0,00CC00]&Colours=[0,3,AA00AA]
See arrays for more information about specifying array values.
-
Layout - Layout type to use when laying out the components.
Valid values are:
- ltAbsolute - Merge components in their original locations.
- ltStackedHorizontal - Merge components in a horizontally stacked configuration.
- ltStackedVertical - Merge components in a vertically stacked configuration.
Default is ltAbsolute.
-
StackedSpacing - Spacing to use between elements. Units are in embroidery points.
Valid only when Layout is ltStackedHorizontal or ltStackedVertical.
Default is 0 embroidery points.
-
StackedAlignment - Alignment to use when stacking elements.
Valid values are:
- satCenter - Center aligns the elements.
- satNear - Left or top aligns the elements.
- satFar - Right or bottom aligns the elements.
Valid only when Layout is ltStackedHorizontal or ltStackedVertical.
Default is satCenter.
-
ElementStartStop - The index from the Elements[] above in the Compund call to use as the Start/Stop position.
- Values are 0-based indexes
- Example: ElementStartStop=1 - Use the Start/Stop from the second element in the request
-
StartLocation - Sets the design start position.
-
StopLocation - Sets the design stop position.
-
Default is sslCentre if nothing is spcified for Start or Stop or ElementStartStop.
-
See start/stop parameters for all the possible values.
Compounds can be transformed.
See transformation parameters.
Lettering Note
The following characters are been substituted by their symbols. To use any of the character in a text, replace that character with it's code for cross browser compatibility.
Example: Text=DE%E2%94%90F will render DE+F
Character |
Symbol |
Code |
& |
┌ |
%E2%94%8C |
+ |
┐ |
%E2%94%90 |
# |
└ |
%E2%94%94 |
< | ┤ | %E2%94%A4 |
Example
Compound?Elements[0]=Lettering%3fText=ABC&Elements[1]=Lettering%3fText=DEF%26Y1=300%26Y2=300
This produces 2 lines of text:
- Lettering&Text=ABC
- Lettering&Text=DEF&Y1=300&Y2=300