diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2012-07-15 10:09:40 +1000 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2012-07-15 10:09:40 +1000 |
commit | 71e3d0e5595cb606910c625e8d5ab1322ae22fd4 (patch) | |
tree | 0d7b1819b5deb6e4ddb8337ec985ea94a15c0fb9 | |
parent | 9be5faa95009cb866c1f248b7011d836fca5a6ce (diff) | |
download | scintilla-mirror-71e3d0e5595cb606910c625e8d5ab1322ae22fd4.tar.gz |
Fix position and remove dead code.
-rw-r--r-- | cocoa/PlatCocoa.mm | 9 |
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); } } |