1
0
Fork 0

feat(markdown): New docs for various things

This commit is contained in:
joostdecock 2023-10-29 17:20:35 +01:00
parent 9fe93e03ce
commit 6b147d81a0
93 changed files with 1274 additions and 589 deletions

View file

@ -7,18 +7,20 @@ to verify their pattern is printed to scale.
The white inside of the box provides a metric scale, and the black outside
of the box provides an imperial scale.
The `scalebox` macro is is provided by the [annotations
plugin](/reference/plugins/annotations).
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
part of [core-plugins](/reference/plugins/core) (so it is available by default).
## Signature
```js
macro('scalebox', {
String id = 'scalebox',
Point at,
String lead,
Number rotate,
String text,
String title,
Boolean force = false,
})
```
@ -43,34 +45,16 @@ macro('scalebox', {
| Property | Default | Type | Description |
|------------:|---------|---------------------|-------------|
| `id` | `scalebox` | `string` | The ID of this macro instance |
| `at` | | [Point](/reference/api/point) | The point to anchor the _scale box_ on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | _pattern name + version_ | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
## Result
| Generated Element | Description |
|-------------------|-------------|
| `paths.__scaleboxImperial` | Path of the imperial, outer box |
| `paths.__scaleboxMetric` | Path of the metric, inner box |
| `points.__scaleboxLead` | Point anchoring the lead text above the title |
| `points.__scaleboxTitle` | Point anchoring the title text |
| `points.__scaleboxTitle` | Point anchoring the text below the title |
| `points.__scaleboxImperial` | Point anchoring the imperial text |
| `points.__scaleboxMetric` | Point anchoring the metric text |
| `points.__scalebox[Metric/Imperial][Top/Bottom][Left/Right]` | Points for the corners of the boxes |
## Notes
### Removing the scalebox
If you inherit a part with a scalebox on it and you'd like to remove all points and paths
generated by the scalebox macro, you can do so by passing `false` to the macro:
```js
macro('scalebox', false)
```
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.