<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hi !</div>
<div>&nbsp;</div>
<div>I am quite new to this stuff so please be patient in case I write just nonsense here&#8230;</div>
<div>I try to display two items (for now e.g. two vtkChartXY) using the 2D API. I tried to go along the example &#8230;/Testing/Cxx/TestMultipleChartRenderers.cxx, but unfortunately already this example does not work for me quite as expected.</div>
<div>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.</div>
<div>&nbsp;</div>
<div>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&nbsp; modified TestMultipleChartRenderers.cxx a bit to have a look at that:</div>
<div>&nbsp;</div>
<div>int&nbsp;TestMultipleChartRenderers(int&nbsp;,&nbsp;char&nbsp;*&nbsp;[])</div>
<div>&nbsp;</div>
<div> &#8230;.</div>
<div style="text-indent: 35pt; ">&nbsp;</div>
<div style="text-indent: 35pt; ">chartScene-&gt;SetRenderer(ren); </div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lastscene = chartScene;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeX = (viewports[4*i&#43;2] - viewports[4*i]) * 800;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeY = (viewports[4*i&#43;3] - viewports[4*i&#43;1]) * 640;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chartScene-&gt;SetGeometry(sizeX, sizeY);</div>
<div>&nbsp;</div>
<div>&#8230;</div>
<div>&nbsp;</div>
<div>iren-&gt;Initialize();</div>
<div>cout &lt;&lt; &quot;Print() Output of last scene before rendering&quot; &lt;&lt; endl;</div>
<div>lastscene-&gt;Print(cout);</div>
<div>renwin-&gt;Render();</div>
<div>cout &lt;&lt; &quot;Print() Output of last scene after rendering&quot; &lt;&lt; endl;</div>
<div>lastscene-&gt;Print(cout);</div>
<div>iren-&gt;Start();</div>
<div>&nbsp;</div>
<div>&#8230;</div>
<div>&nbsp;</div>
<div>Output is:</div>
<div>&nbsp;</div>
<div>Print() Output of last scene before rendering</div>
<div>vtkContextScene (030798A0)</div>
<div>&nbsp; Debug: Off</div>
<div>&nbsp; Modified Time: 2084</div>
<div>&nbsp; Reference Count: 1</div>
<div>&nbsp; Registered Events:</div>
<div>&nbsp;&nbsp;&nbsp; Registered Observers:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkObserver (0307A388)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Event: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EventName: DeleteEvent</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command: 030783C0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Priority: 0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkObserver (0307A368)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Event: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EventName: DeleteEvent</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command: 03076858</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Priority: 0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag: 1</div>
<div>&nbsp; Widthxheight: 400&nbsp;&nbsp;&nbsp;&nbsp; 320</div>
<div>&nbsp;</div>
<div>Print() Output of last scene after rendering</div>
<div>vtkContextScene (030798A0)</div>
<div>&nbsp; Debug: Off</div>
<div>&nbsp; Modified Time: 3056</div>
<div>&nbsp; Reference Count: 1</div>
<div>&nbsp; Registered Events:</div>
<div>&nbsp;&nbsp;&nbsp; Registered Observers:</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkObserver (0307A388)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Event: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EventName: DeleteEvent</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command: 030783C0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Priority: 0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkObserver (0307A368)</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Event: 2</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EventName: DeleteEvent</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Command: 03076858</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Priority: 0</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tag: 1</div>
<div>&nbsp; Widthxheight: 800&nbsp;&nbsp;&nbsp;&nbsp; 640</div>
<div>&nbsp;</div>
<div>So in the first case the 400 X 320 pixel geometry is what I expected, since for that last scene the viewport&nbsp; is set to {<font face="Courier New, monospace" size="2"> </font>0.5,0.5,1.0,1.0 } and the window dimensions are 800 X 640, but after the explicit
call to Render(), this seems to be reset.</div>
<div>&nbsp;</div>
<div>So any ideas on that ? Am I doing something wrong here ?</div>
<div>&nbsp;</div>
<div>Thank you,</div>
<div>Daniel</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>