Mercurial > hg > orthanc-stone
changeset 95:f47349f4815c wasm
fix for wasm
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 May 2017 10:12:54 +0200 |
parents | 7b14c12a3be5 |
children | f8bce1bebe01 |
files | Framework/Widgets/LayerWidget.cpp Resources/CMake/CairoConfiguration.cmake |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Widgets/LayerWidget.cpp Mon May 29 18:03:30 2017 +0200 +++ b/Framework/Widgets/LayerWidget.cpp Tue May 30 10:12:54 2017 +0200 @@ -131,11 +131,19 @@ cairo_t *cr = context.GetObject(); cairo_translate(cr, x, y); + +#if 1 + double s = 5.0 / view.GetZoom(); + cairo_rectangle(cr, -s, -s, 2.0 * s, 2.0 * s); +#else + // TODO Drawing circles makes WebAssembly crash! cairo_arc(cr, 0, 0, 5.0 / view.GetZoom(), 0, 2 * M_PI); +#endif + cairo_set_line_width(cr, 2.0 / view.GetZoom()); cairo_set_source_rgb(cr, 1, 1, 1); cairo_stroke_preserve(cr); - cairo_set_source_rgb(cr, 1, 0, 0); + cairo_set_source_rgb(cr, 1, 0, 0); cairo_fill(cr); }
--- a/Resources/CMake/CairoConfiguration.cmake Mon May 29 18:03:30 2017 +0200 +++ b/Resources/CMake/CairoConfiguration.cmake Tue May 30 10:12:54 2017 +0200 @@ -21,9 +21,9 @@ if (STATIC_BUILD OR NOT USE_SYSTEM_CAIRO) - SET(CAIRO_SOURCES_DIR ${CMAKE_BINARY_DIR}/cairo-1.14.6) - SET(CAIRO_URL "http://www.orthanc-server.com/downloads/third-party/Stone/cairo-1.14.6.tar.xz") - SET(CAIRO_MD5 "23a0b2f0235431d35238df1d3a517fdb") + SET(CAIRO_SOURCES_DIR ${CMAKE_BINARY_DIR}/cairo-1.14.8) + SET(CAIRO_URL "http://www.orthanc-server.com/downloads/third-party/Stone/cairo-1.14.8.tar.xz") + SET(CAIRO_MD5 "4ef0db2eacb271c74f8a3fd87822aa98") DownloadPackage(${CAIRO_MD5} ${CAIRO_URL} "${CAIRO_SOURCES_DIR}")