Updated docs
This commit is contained in:
parent
942c96e546
commit
5311f612c7
@ -41,3 +41,12 @@ loads an image from the url into memory as a Pixmap.
|
||||
returns true if load was successful otherwise returns false.
|
||||
|
||||
- `imageUrl` string (_optional_). Absolute path of the image that needs to be loaded in the memory.
|
||||
|
||||
#### `pixMap.scaled(width, height, aspectRatioMode?)`
|
||||
|
||||
Scales the pixmap to provided height and width with respect to aspectRatioMode.
|
||||
This method doesnt mutate this pixmap and rather returns a new pixmap with new height and width.
|
||||
|
||||
- `width` number. Width in pixels for new pixmap.
|
||||
- `height` number. Height in pixels for new pixmap.
|
||||
- `aspectRatioMode` AspectRatioMode (_optional_). Specifies how scaling should happen. [AspectRatio is an enum from Qt](QtEnums.md)
|
||||
|
||||
13
docs/api/QtEnums.md
Normal file
13
docs/api/QtEnums.md
Normal file
@ -0,0 +1,13 @@
|
||||
## Enums from Qt
|
||||
|
||||
For a complete list of Enums that we can use from Javascript see file
|
||||
|
||||
Qt enums: [`src/lib/QtEnums/index.ts`](https://github.com/master-atul/nodegui/blob/master/src/lib/QtEnums/index.ts) in the NodeGui repo.
|
||||
|
||||
All the enums in this file can be imported directly from `@nodegui/@nodegui`.
|
||||
|
||||
### Example
|
||||
|
||||
```js
|
||||
import { AspectRatioMode } from "@nodegui/nodegui";
|
||||
```
|
||||
Loading…
Reference in New Issue
Block a user