Merge pull request #5300 from Yash-Ambekar/Yash-Ambekar/issue-#4078
Added documentation of two new methods in the utils section of API.
This commit is contained in:
commit
28bb38d511
2 changed files with 34 additions and 0 deletions
18
markdown/dev/reference/api/utils/applytransformtopoint/en.md
Normal file
18
markdown/dev/reference/api/utils/applytransformtopoint/en.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: utils.applyTransformToPoint()
|
||||
---
|
||||
|
||||
The `utils.applyTransformToPoint()` function applies a specified transformation to the point's coordinates. Returns the transformed point as a [Point](/reference/api/point) object.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Point utils.applyTransformToPoint(string transform, Point A)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
1st parameter is a SVG transform string. Eg: `scale(sfx, sfy)` where `sfx` and `sfy` are the scaling factors along the x-axis and y-axis respectively.
|
||||
|
||||
2nd parameter is the original point that is to be transformed. It is a [Point](/reference/api/point) object.
|
||||
|
16
markdown/dev/reference/api/utils/combinetransforms/en.md
Normal file
16
markdown/dev/reference/api/utils/combinetransforms/en.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: utils.combineTransform()
|
||||
---
|
||||
|
||||
The `utils.combineTransform()` function merges an array of SVG transformations into a single composite matrix transformation. Returns a single combined matrix transform string.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
string utils.combineTransforms(string[] transforms)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
The function only takes a single parameter i.e array of transform strings. Eg: `["scale(sfx, sfy)", rotate(angle), translate(tx, ty)]`
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue