File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2648,7 +2648,6 @@ static CGFloat _get_device_scale(CGContextRef cr)
26482648 const char * italic;
26492649 float angle;
26502650 CTFontRef font;
2651- CGColorRef color;
26522651 CGFloat descent;
26532652#if PY33
26542653 const char * text;
@@ -2697,22 +2696,16 @@ static CGFloat _get_device_scale(CGContextRef cr)
26972696 return NULL ;
26982697 }
26992698
2700- color = CGColorCreateGenericRGB (self->color [0 ],
2701- self->color [1 ],
2702- self->color [2 ],
2703- self->color [3 ]);
2704-
27052699 keys[0 ] = kCTFontAttributeName ;
2706- keys[1 ] = kCTForegroundColorAttributeName ;
2700+ keys[1 ] = kCTForegroundColorFromContextAttributeName ;
27072701 values[0 ] = font;
2708- values[1 ] = color ;
2702+ values[1 ] = kCFBooleanTrue ;
27092703 CFDictionaryRef attributes = CFDictionaryCreate (kCFAllocatorDefault ,
27102704 (const void **)&keys,
27112705 (const void **)&values,
27122706 2 ,
27132707 &kCFTypeDictionaryKeyCallBacks ,
27142708 &kCFTypeDictionaryValueCallBacks );
2715- CGColorRelease (color);
27162709 CFRelease (font);
27172710
27182711 CFAttributedStringRef string = CFAttributedStringCreate (kCFAllocatorDefault ,
You can’t perform that action at this time.
0 commit comments