[vtkusers] Changing (window/viewport) resize behaviour

John Drescher drescherjm at gmail.com
Thu Apr 28 11:27:28 EDT 2011


On Thu, Apr 28, 2011 at 11:20 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>> On Thu, Apr 28, 2011 at 10:49 AM, Jon Payne <jpayne at hgl-dynamics.com> wrote:
>>> Hi Everyone,
>>>
>>> Been lurking here for a while and enjoying VTK.
>>>
>>> I want to be able to change the resize behaviour from fitted the actors into
>>> the window and scaled them if the height changes to just resizing them in
>>> both x and y to fit the window/viewport e.g. if a window is resized from a
>>> sqaure to a rectangle I want all the contents to also resize and be
>>> rectangular.
>>>
>>> Can anyone give me any pointers on where to look to change this behaviour?
>>>
> On Thu, Apr 28, 2011 at 9:17 AM, John Drescher <drescherjm at gmail.com> wrote:
>> I did this in my application by observing the
>> vtkCommand::ModifiedEvent on the render window. Then checking if the
>> size of the window changed from the last size if it did I adjusted the
>> zoom by moving the camera.
>
> Using vtkCommand::ConfigureEvent is a cleaner solution (fewer false positives).
>

Thanks I will try that when I get a chance.

John



More information about the vtkusers mailing list