Permalink
Browse files

Fix cropping on retina displays

  • Loading branch information...
1 parent 3274905 commit 7af78dbcf765e75370cc4b0b2b1fe3c197b0d2de @herrstucki herrstucki committed Feb 12, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 webkit2png
View
@@ -283,9 +283,9 @@ class WebkitLoad (Foundation.NSObject, WebKit.protocols.WebFrameLoadDelegate):
zoom = self.options.zoom
- cropRect = Foundation.NSMakeRect(
+ cropRect = view.window().convertRectToBacking_(Foundation.NSMakeRect(
zoom * left, zoom * top,
- zoom * el.offsetWidth(), zoom * el.offsetHeight())
+ zoom * el.offsetWidth(), zoom * el.offsetHeight()))
cropped = Quartz.CGImageCreateWithImageInRect(
bitmapdata.CGImage(), cropRect)

0 comments on commit 7af78db

Please sign in to comment.