diff --git a/docs/api/native-image.md b/docs/api/native-image.md index 000c6d303cd2..eed0b5cbaa18 100644 --- a/docs/api/native-image.md +++ b/docs/api/native-image.md @@ -152,6 +152,10 @@ Returns a [Buffer][buffer] that contains the image's `PNG` encoded data. Returns a [Buffer][buffer] that contains the image's `JPEG` encoded data. +#### `image.toBitmap()` + +Returns a [Buffer][buffer] that contains the image's raw pixel data. + #### `image.toDataURL()` Returns the data URL of the image. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index c1ad9912c4c3..be94b1b7553f 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -334,7 +334,13 @@ Returns: * `event` Event * `type` String * `image` NativeImage (optional) -* `scale` Float (optional) +* `scale` Float (optional) - scaling factor for the custom cursor +* `size` Object (optional) - the size of the `image` + * `width` Integer + * `height` Integer +* `hotspot` Object (optional) - coordinates of the custom cursor's hotspot + * `x` Integer - x coordinate + * `y` Integer - y coordinate Emitted when the cursor's type changes. The `type` parameter can be `default`, `crosshair`, `pointer`, `text`, `wait`, `help`, `e-resize`, `n-resize`, @@ -346,8 +352,8 @@ Emitted when the cursor's type changes. The `type` parameter can be `default`, `not-allowed`, `zoom-in`, `zoom-out`, `grab`, `grabbing`, `custom`. If the `type` parameter is `custom`, the `image` parameter will hold the custom -cursor image in a `NativeImage`, and the `scale` will hold scaling information -for the image. +cursor image in a `NativeImage`, and `scale`, `size` and `hotspot` will hold +additional information about the custom cursor. #### Event: 'context-menu'