Browse Source

Use getBitmap in docs

Cheng Zhao 8 years ago
parent
commit
7173d8b01b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      docs/api/web-contents.md
  2. 1 1
      docs/tutorial/offscreen-rendering.md

+ 2 - 2
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')
 ```

+ 1 - 1
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)
 })