chore(markdown): Working on v3 docs
This commit is contained in:
parent
22680fbddc
commit
1f7ba79f81
17 changed files with 433 additions and 272 deletions
|
@ -2,27 +2,24 @@
|
|||
title: Pattern.render()
|
||||
---
|
||||
|
||||
A pattern's `render()` method will render the pattern to SVG and return
|
||||
the SVG as a string. It should only ever be called after calling
|
||||
The `Pattern.render()` method will render the pattern to SVG and return
|
||||
that SVG as a string. It should only be called after calling
|
||||
[Pattern.draft()](/reference/api/pattern/draft/) first.
|
||||
|
||||
# Pattern.render() signature
|
||||
## Pattern.render() signature
|
||||
|
||||
```js
|
||||
string pattern.render()
|
||||
```
|
||||
|
||||
# Pattern.render() example
|
||||
## Pattern.render() example
|
||||
|
||||
```js
|
||||
import Aaron from "@freesewing/aaron"
|
||||
import models from "@freesewing/models"
|
||||
import { Aaron } from "@freesewing/aaron"
|
||||
import { cisFemaleAdult34 } from "@freesewing/models"
|
||||
|
||||
const pattern = new Aaron({
|
||||
settings: {
|
||||
embed: true,
|
||||
},
|
||||
measurements: models.manSize38
|
||||
measurements: cisFemaleAdult34
|
||||
})
|
||||
|
||||
const svg = pattern.draft().render()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue