mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
Fix cyan garbage background by clearing context before fill in cocoa_render_line_of_text
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/b2ef3bec-1f2a-4525-8c57-926b72616f57 Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a3c09cc1be
commit
ef02c64ff5
@@ -952,6 +952,7 @@ cocoa_render_line_of_text(const char *text, const color_type fg, const color_typ
|
||||
|
||||
CGContextSetShouldAntialias(ctx, true);
|
||||
CGContextSetShouldSmoothFonts(ctx, true); // sub-pixel antialias
|
||||
CGContextClearRect(ctx, CGRectMake(0.0, 0.0, width, height));
|
||||
CGContextSetRGBFillColor(ctx, ((bg >> 16) & 0xff) / 255.f, ((bg >> 8) & 0xff) / 255.f, (bg & 0xff) / 255.f, ((bg >> 24) & 0xff) / 255.f);
|
||||
CGContextFillRect(ctx, CGRectMake(0.0, 0.0, width, height));
|
||||
CGContextSetTextDrawingMode(ctx, kCGTextFill);
|
||||
|
||||
Reference in New Issue
Block a user