This commit is contained in:
joshmoz%gmail.com 2007-06-15 01:54:44 +00:00
Родитель da24e583ca
Коммит 170a5069a5
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -184,14 +184,14 @@ nsNativeThemeCocoa::DrawButton(CGContextRef cgContext, ThemeButtonKind inKind,
[image setSize:NSMakeSize(offscreenWidth, inBoxRect.size.height)]; [image setSize:NSMakeSize(offscreenWidth, inBoxRect.size.height)];
// render to the given CGContextRef // render to the given CGContextRef
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAX_OS_X_VERSION_10_4 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
// graphicsContextWithGraphicsPort is only available on 10.4+ // graphicsContextWithGraphicsPort is only available on 10.4+
[NSGraphicsContext saveGraphicsState]; [NSGraphicsContext saveGraphicsState];
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES]]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES]];
#endif #endif
[image compositeToPoint:NSMakePoint(inBoxRect.origin.x, inBoxRect.origin.y + inBoxRect.size.height) [image compositeToPoint:NSMakePoint(inBoxRect.origin.x, inBoxRect.origin.y + inBoxRect.size.height)
operation:NSCompositeSourceOver]; operation:NSCompositeSourceOver];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAX_OS_X_VERSION_10_4 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
[NSGraphicsContext restoreGraphicsState]; [NSGraphicsContext restoreGraphicsState];
#endif #endif
[image release]; [image release];