diff options
author | David Robillard <d@drobilla.net> | 2019-07-22 18:49:09 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-03 08:34:38 +0200 |
commit | 816607027012de0205e144f3edd3fdcfd43db563 (patch) | |
tree | 6baafc16e21b6186c51d9ada7c97116b6a30811c /pugl/detail/mac_cairo.m | |
parent | f76954359229c25a6c9d29d6de3e75ab3a25f8dd (diff) | |
download | pugl-816607027012de0205e144f3edd3fdcfd43db563.tar.gz pugl-816607027012de0205e144f3edd3fdcfd43db563.tar.bz2 pugl-816607027012de0205e144f3edd3fdcfd43db563.zip |
Add functions to get and set view size and position
Diffstat (limited to 'pugl/detail/mac_cairo.m')
-rw-r--r-- | pugl/detail/mac_cairo.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl/detail/mac_cairo.m b/pugl/detail/mac_cairo.m index ce03486..fcb4f07 100644 --- a/pugl/detail/mac_cairo.m +++ b/pugl/detail/mac_cairo.m @@ -50,7 +50,7 @@ PuglWrapperView* wrapper = (PuglWrapperView*)[self superview]; [super resizeWithOldSuperviewSize:oldSize]; - [wrapper dispatchConfigure:[self bounds]]; + [wrapper setReshaped]; } - (void) drawRect:(NSRect)rect @@ -74,7 +74,7 @@ puglMacCairoCreate(PuglView* view) PuglCairoView* drawView = [PuglCairoView alloc]; drawView->puglview = view; - [drawView initWithFrame:NSMakeRect(0, 0, view->width, view->height)]; + [drawView initWithFrame:NSMakeRect(0, 0, view->frame.width, view->frame.height)]; if (view->hints[PUGL_RESIZABLE]) { [drawView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; } else { @@ -111,7 +111,7 @@ puglMacCairoEnter(PuglView* view, bool drawing) CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; drawView->surface = cairo_quartz_surface_create_for_cg_context( - context, view->width, view->height); + context, view->frame.width, view->frame.height); drawView->cr = cairo_create(drawView->surface); |