Fix transparency not working when drawing images

This commit is contained in:
anthony 2022-02-04 09:12:05 +00:00
parent 315af41624
commit 5e766f7b7b
1 changed files with 2 additions and 3 deletions

View File

@ -192,9 +192,8 @@ static nserror plot_bitmap(const struct redraw_context *ctx, struct bitmap *bitm
[tf scaleXBy: 1.0 yBy: -1.0]; [tf scaleXBy: 1.0 yBy: -1.0];
[tf translateXBy: 0 yBy: -offset]; [tf translateXBy: 0 yBy: -offset];
[GSCurrentContext() GSSetCTM: tf]; [GSCurrentContext() GSSetCTM: tf];
[[NSColor redColor] set]; [bmp drawInRect: rect fromRect: NSMakeRect(0, 0, width, height)
[GSCurrentContext() setCompositingOperation: NSCompositeSourceOver]; operation: NSCompositeSourceOver fraction: 1.0 respectFlipped: NO hints: nil];
[bmp drawInRect: rect];
[NSGraphicsContext restoreGraphicsState]; [NSGraphicsContext restoreGraphicsState];