From 32e45fe23c42df8534267ce36724bf30f36b17dd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 15 Jul 2012 10:09:40 +1000 Subject: Fix position and remove dead code. --- cocoa/PlatCocoa.mm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'cocoa') 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); } } -- cgit v1.2.3