[vtkusers] questions about renderwindow size

David Gobbi david.gobbi at gmail.com
Mon Oct 27 23:53:50 EDT 2014

Hi Lin,

Calling Render() should not change the window size, and in fact if it did,
then many of the nightly VTK tests would fail.  This means that there must
be something different about your computer as compared to the computers
that are used to test VTK.  So, the more information that you can provide
about your system, the better!

1) What operating system are you using (be as specific as possible)?
2) What version of VTK are you using?
3) What size did GetSize() return?  The exact numbers can be useful
  in figuring out what is causing the problem.
4) If possible, run "ctest" to test your VTK for other problems.

 - David

On Mon, Oct 27, 2014 at 9:39 PM, Lin M <majcjc at gmail.com> wrote:

> Hi guys,
> I met a problem which confused me. I tried to specify the window size by
> myself. But when I checked it later, the GetSize() always returned a value
> a little bit different from what I set before. I put the code below. I only
> called the renderwin to Render() before I checked the window size. It seems
> the Render() changes the window size. But I don't get why is that. Does
> anyone can help me about that? Thanks very much!
> vtkSmartPointer< vtkRenderWindow > _imgRenderWin = vtkSmartPointer<
> vtkRenderWindow >::New();
> int _size[2] = { 700, 500 };
> _imgRenderWin->SetSize(_size);
> _imgRenderWin->AddRenderer(_renderer);
> _imgRenderWin->Render();
> int *_dim;
> _dim = _imgRenderWin->GetSize();
> int _dimx = _dim[0];
> int _dimy = _dim[1];
> Best,
> Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141027/5847fc78/attachment.html>

More information about the vtkusers mailing list