[vtkusers] Question on Viewports/vtkChartXY/SetGeometry in example TestMultipleChartRenderers.cxx

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Nov 29 16:29:39 EST 2010


Hi,

2010/11/29 Frese Daniel Dr. <frese at heidenhain.de>:
> I am quite new to this stuff so please be patient in case I write just
> nonsense here…
> I try to display two items (for now e.g. two vtkChartXY) using the 2D API. I
> tried to go along the example …/Testing/Cxx/TestMultipleChartRenderers.cxx,
> but unfortunately already this example does not work for me quite as
> expected.
> If I understand correctly, in this example the rendering window is split
> into several viewports and each viewport gets a renderer and so on. If I
> execute, the window is split as advertised, but the plots are badly clipped;
> basically the charts are not scaled to the corresponding viewport size. It
> just looks horrible.
>
> Digging a bit deeper I found, that the vtkChartXY seem to get their geometry
> information from their scenes, so I set explicitly the geometry of the
> corresponding scenes. I  modified TestMultipleChartRenderers.cxx a bit to
> have a look at that:
>
There is some code I am going to merge in soon (not quite finished) to
display multiple charts in the same scene. I will see if I can get it
pushed in soon, as this is a common request. I will of course add a
test demonstrating the functionality. I have marked this thread so
that I remember to reply here once I merge the changes in.

Thanks,

Marcus



More information about the vtkusers mailing list