changeset 1489:6e43cac7833c

Added public method to update canvas pixel size from CSS size
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 23 Jun 2020 15:41:52 +0200
parents 7f16987131e1
children c5627b8493f3
files Framework/Viewport/WebAssemblyViewport.cpp Framework/Viewport/WebAssemblyViewport.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Viewport/WebAssemblyViewport.cpp	Tue Jun 23 13:44:23 2020 +0200
+++ b/Framework/Viewport/WebAssemblyViewport.cpp	Tue Jun 23 15:41:52 2020 +0200
@@ -288,6 +288,11 @@
     }
   }
 
+  void WebAssemblyViewport::UpdateCanvasSize()
+  {
+    UpdateSize(*compositor_);
+  }
+
   WebAssemblyViewport::~WebAssemblyViewport()
   {
     emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW,
--- a/Framework/Viewport/WebAssemblyViewport.h	Tue Jun 23 13:44:23 2020 +0200
+++ b/Framework/Viewport/WebAssemblyViewport.h	Tue Jun 23 15:41:52 2020 +0200
@@ -99,6 +99,7 @@
 
     ~WebAssemblyViewport();
 
+    virtual void UpdateCanvasSize();
 
     /**
     This method takes ownership