Use getBitmap in docs

This commit is contained in:
Cheng Zhao 2016-08-05 18:08:36 +09:00
parent 1be253e1aa
commit 7173d8b01b
2 changed files with 3 additions and 3 deletions

View file

@ -467,7 +467,7 @@ Returns:
* `y` Integer - The y coordinate on the image.
* `width` Integer - The width of the dirty area.
* `height` Integer - The height of the dirty area.
* `image` [NativeImage](native-image.md) - The image data of the dirty rect
* `image` [NativeImage](native-image.md) - The image data of the whole frame.
Emitted when a new frame is generated. Only the dirty area is passed in the
buffer.
@ -477,7 +477,7 @@ const {BrowserWindow} = require('electron')
let win = new BrowserWindow({webPreferences: {offscreen: true}})
win.webContents.on('paint', (event, dirty, image) => {
// updateBitmap(dirty, image.toBitmap())
// updateBitmap(dirty, image.getBitmap())
})
win.loadURL('http://github.com')
```

View file

@ -46,7 +46,7 @@ app.once('ready', () => {
})
win.loadURL('http://github.com')
win.webContents.on('paint', (event, dirty, image) => {
// updateBitmap(dirty, image.toBitmap())
// updateBitmap(dirty, image.getBitmap())
})
win.webContents.setFrameRate(30)
})