mirror of
https://github.com/electron/electron.git
synced 2026-02-15 17:45:33 -05:00
Flip the y axis in CapturePage API, fixes #148.
This commit is contained in:
@@ -213,8 +213,11 @@ base::ProcessHandle NativeWindow::GetRenderProcessHandle() {
|
||||
|
||||
void NativeWindow::CapturePage(const gfx::Rect& rect,
|
||||
const CapturePageCallback& callback) {
|
||||
gfx::Rect flipped_y_rect = rect;
|
||||
flipped_y_rect.set_y(-rect.y());
|
||||
|
||||
GetWebContents()->GetRenderViewHost()->CopyFromBackingStore(
|
||||
rect,
|
||||
flipped_y_rect,
|
||||
gfx::Size(),
|
||||
base::Bind(&NativeWindow::OnCapturePageDone,
|
||||
weak_factory_.GetWeakPtr(),
|
||||
|
||||
Reference in New Issue
Block a user