Designs
Description
Designs are generated by using the "Designs" option. The designs option is added after the
action. The server-side path to the design is specified after "Designs".
Design parameters are added after a ? character which is appended to Designs.
Format
Designs/[path]?[parameters]
For example: Designs/MySubdirectory/MyDesign.PXF?ImageWidth=400
Parameters
-
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.
- ColourMatchField - Name/Code value specifying what to look up in the palette when assigning a colour for the Element when colourizing and Element. Default is Name.
- Personalizations - Array of personalization values.
- Personalizations have 4 parameters that can be specified:
- Name - The name of the element to be replaced in the template. This was the value used to name the element during creation of the tempalte
- Example: A design placeholder could have a value of DESIGN1:Ball
- Example: A text placeholder could have a value of TEXT1:Bears
- ElementColour - The value that will be used for the element in the template. Requires Name parameter.
- IsHidden - True/False value specifying if the named element will be removed from the final template render or generation. Default is false. Requires Name parameter.
- TranslateX - X directional offset to move the component. Positive values are to the right. Default is 0.
- TranslateY - Y directional offset to move the component. Positive values are down. Default is 0.
- If you wanted to specify 2 personaliztion items, one for the design element and one for a text item, then you would use:
- Personalizations[0].Name=DESIGN1:Vollyball&Personalizations[0].Design=Football1.PXF&Personalizations[1].Name=TEXT1:Bears&Personalizations[1].Text=TEXT1&Personalizations[1].TextColour=Black
- Threads - Array of Thread Color values in the design. See arrays for more information about specifying array values.
- Threads Note: Threads specified will be replaced anywhere they are referenced in the design.
- Threads have 7 parameters that can be specified:
- Name - The name of the Thread Color to be replaced in the design.
- Code - The code of the Thread Color to be replaced in the design.
- Manufacturer - The manufacturer of the Thread Color to be replaced in the design.
- Thickness - The thickness of the Thread Color to be replaced in the design. Default is 3.
- Red - The Red value of the Thread Color to be replaced in the design. Number from 0-255. Default is 0.
- Green - The Green value of the Thread Color to be replaced in the design. Number from 0-255. Default is 0.
- Blue - The Blue value of the Thread Color to be replaced in the design. Number from 0-255. Default is 0.
- UpdateThreadsOnStart - True/False value that will replace the Thread Color values on processing start if set to true, before the personalizations, or on processing end, after the personalizations, if set to false. Default is false.
- UpdateThreadsOnStart Note: Only active when specified along with Threads parameters. Useful when a personalization will reference a replaced Thread Color, otherwise it may not be available on processing start.
Designs can be transformed.
See transformation parameters.
Example
The following loads the server-side design "Emoji.PXF", adjusts the palette such that
needle 0 is red and needle 2 is blue. Then it colourizes the design such that the first stop is needle 1 (blue)
and the second stop is needle 0 (red).
Designs/Emoji.PXF?Palette[0]=ff0000&Palette[1]=0000ff&Needles[0]=1&Needles[1]=0