[vtkusers] vtk.js: Resize rendering window when using vtkGenericRenderWindow

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Aug 29 12:53:18 EDT 2018


To set the size of the window, you need to call setSize(widget, height) on
the OpenGLRenderWindow instance.
But for the generic GenericRenderWindow, you just need to call .resize() to
let know the renderer that it should snap to its container size.


On Wed, Aug 29, 2018 at 9:46 AM Paul Korir <pkorir at ebi.ac.uk> wrote:

> Greetings,
>
> I'm using the above class and have managed to use it to render some VTP
> files. However, when I place the render window inside a div of 1000 X
> 1000px the view is pixelated. I noticed the canvas is set to 300px
> square. I've scoured the API but cannot see how to resize the
> canvas/render window.
>
> Two requests:
>
> 1) Any idea when vtk.js will be more fully documented? It's quite hard
> to work with it as is.
>
> 2) What is the recommended way to set the size of the canvas/render
> window to fill the space?
>
> --
> Paul K. Korir, PhD
> Scientific Programmer
> EMBL-EBI
> 01223494422
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180829/616e5484/attachment.html>


More information about the vtkusers mailing list