Mercurial > dwindows
comparison mac/dw.m @ 1950:bb4eaf02cdaf
Mac: Pass bi to _create_gc() instead of image. Needs to be NSBitmapImageRep.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 11 Jul 2019 09:34:44 +0000 |
parents | c71e5da5b801 |
children | e30164bc48fb |
comparison
equal
deleted
inserted
replaced
1949:c71e5da5b801 | 1950:bb4eaf02cdaf |
---|---|
6293 _DWLastDrawable = handle; | 6293 _DWLastDrawable = handle; |
6294 #endif | 6294 #endif |
6295 } | 6295 } |
6296 if(bi) | 6296 if(bi) |
6297 { | 6297 { |
6298 id gc = _create_gc(image, flags & DW_DRAW_NOAA ? NO : YES); | 6298 id gc = _create_gc(bi, flags & DW_DRAW_NOAA ? NO : YES); |
6299 [NSGraphicsContext saveGraphicsState]; | 6299 [NSGraphicsContext saveGraphicsState]; |
6300 [NSGraphicsContext setCurrentContext:gc]; | 6300 [NSGraphicsContext setCurrentContext:gc]; |
6301 } | 6301 } |
6302 | 6302 |
6303 NSBezierPath* aPath = [NSBezierPath bezierPath]; | 6303 NSBezierPath* aPath = [NSBezierPath bezierPath]; |
6365 _DWLastDrawable = handle; | 6365 _DWLastDrawable = handle; |
6366 #endif | 6366 #endif |
6367 } | 6367 } |
6368 if(bi) | 6368 if(bi) |
6369 { | 6369 { |
6370 id gc = _create_gc(image, flags & DW_DRAW_NOAA ? NO : YES); | 6370 id gc = _create_gc(bi, flags & DW_DRAW_NOAA ? NO : YES); |
6371 [NSGraphicsContext saveGraphicsState]; | 6371 [NSGraphicsContext saveGraphicsState]; |
6372 [NSGraphicsContext setCurrentContext:gc]; | 6372 [NSGraphicsContext setCurrentContext:gc]; |
6373 } | 6373 } |
6374 | 6374 |
6375 NSColor *color = pthread_getspecific(_dw_fg_color_key); | 6375 NSColor *color = pthread_getspecific(_dw_fg_color_key); |
6432 _DWLastDrawable = handle; | 6432 _DWLastDrawable = handle; |
6433 #endif | 6433 #endif |
6434 } | 6434 } |
6435 if(bi) | 6435 if(bi) |
6436 { | 6436 { |
6437 id gc = _create_gc(image, flags & DW_DRAW_NOAA ? NO : YES); | 6437 id gc = _create_gc(bi, flags & DW_DRAW_NOAA ? NO : YES); |
6438 [NSGraphicsContext saveGraphicsState]; | 6438 [NSGraphicsContext saveGraphicsState]; |
6439 [NSGraphicsContext setCurrentContext:gc]; | 6439 [NSGraphicsContext setCurrentContext:gc]; |
6440 } | 6440 } |
6441 | 6441 |
6442 NSBezierPath* aPath = [NSBezierPath bezierPath]; | 6442 NSBezierPath* aPath = [NSBezierPath bezierPath]; |