feat(markdown): Docs for new/updated core methods
This commit is contained in:
parent
a2800dddda
commit
57d50c42da
8 changed files with 256 additions and 20 deletions
31
markdown/dev/reference/api/path/asrenderprops/en.md
Normal file
31
markdown/dev/reference/api/path/asrenderprops/en.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Path.asRenderProps()
|
||||
---
|
||||
|
||||
The `Path.asRenderProps()` method will return the data stored in the
|
||||
path as a serializable Javascript object. This method is typically
|
||||
not invoked directly but rather called under the hood as a result of
|
||||
calling [`Pattern.getRenderProps()`](/reference/core/pattern/getrenderprops).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Object path.asRenderProps()
|
||||
```
|
||||
|
||||
## Returned object properties
|
||||
|
||||
This returns Javascript object has the following properties:
|
||||
|
||||
| Name | Description |
|
||||
| ----:| ----------- |
|
||||
| `attributes` | The result of [Path.attributes.asRenderProps()](/reference/api/attribute/asrenderprops) |
|
||||
| `hidden` | A boolean indicating whether the path is hidden or not |
|
||||
| `name` | The path name |
|
||||
| `ops` | An array of drawing operations |
|
||||
| `height` | A number indicating the path height in `mm` |
|
||||
| `width` | A number indicating the path width in `mm` |
|
||||
| `topLeft` | The [Point](/reference/api/point) at the top left of the part, or rather its [`Point.asRenderProps()`](/reference/api/point/asrenderprops) result |
|
||||
| `bottomRight` | The [Point](/reference/api/point) at the bottom right of the part, or rather its [`Point.asRenderProps()`](/reference/api/point/asrenderprops) result |
|
||||
| `d` | The path's pathstring for rendering as SVG |
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue