2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: scalebox
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
The `scalebox` macro adds a _scale box_ to your pattern. This box allows users
|
|
|
|
to verify their pattern is printed to scale.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
The `scalebox` macro is provided by the [scalebox
|
|
|
|
plugin](/reference/plugins/scalebox).
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Signature
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
macro('scalebox', {
|
2022-09-30 04:39:30 +02:00
|
|
|
Point at,
|
|
|
|
String lead,
|
|
|
|
Number rotate,
|
|
|
|
String text,
|
|
|
|
String title,
|
2021-08-25 16:09:31 +02:00
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Example
|
|
|
|
|
|
|
|
<Example caption="An example of the scalebox macro">
|
|
|
|
```js
|
|
|
|
({ Point, macro, part }) => {
|
|
|
|
|
|
|
|
macro('scalebox', {
|
|
|
|
at: new Point(0,0),
|
|
|
|
title: 'This is the title',
|
|
|
|
number: 666,
|
|
|
|
})
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
```
|
|
|
|
</Example>
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|-------------|---------|---------------------|-------------|
|
2022-02-20 14:35:50 +01:00
|
|
|
| `at` | | [Point](/reference/api/point) | The point to anchor the _scale box_ on |
|
2021-08-25 16:09:31 +02:00
|
|
|
| `lead` | FreeSewing | String | The lead text above the title |
|
2022-02-20 14:35:50 +01:00
|
|
|
| `title` | _pattern name + version_ | String | The title text |
|
2021-08-25 16:09:31 +02:00
|
|
|
| `text` | (\*) | String | The text below the title |
|
|
|
|
| `rotate` | 0 | Number | Rotation in degrees |
|
|
|
|
|
|
|
|
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
|
2022-07-10 16:09:12 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Notes
|
|
|
|
|
|
|
|
### Removing the scalebox
|
2022-07-10 16:09:12 +02:00
|
|
|
|
2022-07-31 16:11:50 +02:00
|
|
|
If you inherit a part with a scalebox on it and you'd like to remove all points and paths
|
2022-07-10 16:09:12 +02:00
|
|
|
generated by the scalebox macro, you can do so by passing `false` to the macro:
|
|
|
|
|
|
|
|
```js
|
|
|
|
macro('scalebox', false)
|
|
|
|
```
|