diff options
Diffstat (limited to 'src/mac_cairo.m')
-rw-r--r-- | src/mac_cairo.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mac_cairo.m b/src/mac_cairo.m index facb5c1..33fc89a 100644 --- a/src/mac_cairo.m +++ b/src/mac_cairo.m @@ -1,4 +1,4 @@ -// Copyright 2019-2020 David Robillard <d@drobilla.net> +// Copyright 2019-2022 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC #include "implementation.h" @@ -64,7 +64,7 @@ puglMacCairoCreate(PuglView* view) return PUGL_SUCCESS; } -static PuglStatus +static void puglMacCairoDestroy(PuglView* view) { PuglCairoView* const drawView = (PuglCairoView*)view->impl->drawView; @@ -73,7 +73,6 @@ puglMacCairoDestroy(PuglView* view) [drawView release]; view->impl->drawView = nil; - return PUGL_SUCCESS; } static PuglStatus @@ -87,10 +86,11 @@ puglMacCairoEnter(PuglView* view, const PuglExposeEvent* expose) assert(!drawView->surface); assert(!drawView->cr); - const double scale = 1.0 / [[NSScreen mainScreen] backingScaleFactor]; - CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; - const CGSize sizePx = {view->frame.width, view->frame.height}; - const CGSize sizePt = CGContextConvertSizeToUserSpace(context, sizePx); + const double scale = 1.0 / [[NSScreen mainScreen] backingScaleFactor]; + CGContextRef context = + (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; + const CGSize sizePx = {view->frame.width, view->frame.height}; + const CGSize sizePt = CGContextConvertSizeToUserSpace(context, sizePx); // Convert coordinates to standard Cairo space CGContextTranslateCTM(context, 0.0, -sizePt.height); |