From 7173d8b01b009ee4cb6c86d393568cab763648c6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 5 Aug 2016 18:08:36 +0900 Subject: [PATCH] Use getBitmap in docs --- docs/api/web-contents.md | 4 ++-- docs/tutorial/offscreen-rendering.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 1ca64d9efcb..f000193b839 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -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') ``` diff --git a/docs/tutorial/offscreen-rendering.md b/docs/tutorial/offscreen-rendering.md index 0f8a6b3ee48..e47967bd35b 100644 --- a/docs/tutorial/offscreen-rendering.md +++ b/docs/tutorial/offscreen-rendering.md @@ -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) })