File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -2648,7 +2648,6 @@ static CGFloat _get_device_scale(CGContextRef cr)
2648
2648
const char * italic;
2649
2649
float angle;
2650
2650
CTFontRef font;
2651
- CGColorRef color;
2652
2651
CGFloat descent;
2653
2652
#if PY33
2654
2653
const char * text;
@@ -2697,22 +2696,16 @@ static CGFloat _get_device_scale(CGContextRef cr)
2697
2696
return NULL ;
2698
2697
}
2699
2698
2700
- color = CGColorCreateGenericRGB (self->color [0 ],
2701
- self->color [1 ],
2702
- self->color [2 ],
2703
- self->color [3 ]);
2704
-
2705
2699
keys[0 ] = kCTFontAttributeName ;
2706
- keys[1 ] = kCTForegroundColorAttributeName ;
2700
+ keys[1 ] = kCTForegroundColorFromContextAttributeName ;
2707
2701
values[0 ] = font;
2708
- values[1 ] = color ;
2702
+ values[1 ] = kCFBooleanTrue ;
2709
2703
CFDictionaryRef attributes = CFDictionaryCreate (kCFAllocatorDefault ,
2710
2704
(const void **)&keys,
2711
2705
(const void **)&values,
2712
2706
2 ,
2713
2707
&kCFTypeDictionaryKeyCallBacks ,
2714
2708
&kCFTypeDictionaryValueCallBacks );
2715
- CGColorRelease (color);
2716
2709
CFRelease (font);
2717
2710
2718
2711
CFAttributedStringRef string = CFAttributedStringCreate (kCFAllocatorDefault ,
You can’t perform that action at this time.
0 commit comments