aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cocoa/PlatCocoa.mm9
1 files changed, 2 insertions, 7 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 37334043e..7b9f976c4 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -676,16 +676,11 @@ static CGImageRef ImageCreateFromRGBA(int width, int height, const unsigned char
return image;
}
-void SurfaceImpl::DrawRGBAImage(PRectangle /* rc */, int width, int height, const unsigned char *pixelsImage) {
+void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) {
CGImageRef image = ImageCreateFromRGBA(width, height, pixelsImage, true);
if (image) {
- //CGContextSaveGState(gc);
- //CGRect dst = PRectangleToCGRect(rc);
- //CGContextClipToRect(gc, dst);
- CGRect drawRect = CGRectMake (0, 0, width, height);
+ CGRect drawRect = CGRectMake(rc.left, rc.top, width, height);
CGContextDrawImage(gc, drawRect, image);
- //CGContextRestoreGState (gc);
-
CGImageRelease(image);
}
}