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 | 32e45fe23c42df8534267ce36724bf30f36b17dd (patch) | |
tree | 8c853f5d41588cb4adc03a975101fac9fd85ee3c | |
parent | 6f46b6d839733f4207af885d9297dfee5d05fd26 (diff) | |
download | scintilla-mirror-32e45fe23c42df8534267ce36724bf30f36b17dd.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); } } |