1
0
Fork 0
freesewing/sites/dev/docs/reference/api/utils/generatestacktransform
Joost De Cock ab3204f9f1 chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus
setup. It's part of my efforts to simplify FreeSewing's setup so we can
focus on our core value proposition.
2024-09-28 13:13:48 +02:00
..
readme.mdx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00

---
title: utils.generateStackTransform()
---

The `utils.generateStackTransform()` function will generate the SVG transform to implement a given layout configuration on [a stack](/reference/api/stack).

## Signature

```js
Array generateStackTransform(
  Number x = 0,
  Number y = 0,
  Number rotate = 0,
  Boolean flipX = false,
  Boolean flipY = false,
  Stack stack
)
```

## Parameters

The first and second parameters set the value of the *translate transform* along the X and Y axis in millimeter.
In other words, it moves the stack.

The third parameter sets the *rotate transform* in degrees.
In other words, it rotates the stack.

The fourth and fifth parameters flip the part along the X or Y axis respectively.

:::note
This is a low-level function to facilitate intervening in the pattern layout late in the draft process.
It is unlikely you will want to use this.
:::