<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> </div>
<div>I am quite new to this stuff so please be patient in case I write just nonsense here…</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 …/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> </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 modified TestMultipleChartRenderers.cxx a bit to have a look at that:</div>
<div> </div>
<div>int TestMultipleChartRenderers(int , char * [])</div>
<div> </div>
<div> ….</div>
<div style="text-indent: 35pt; "> </div>
<div style="text-indent: 35pt; ">chartScene->SetRenderer(ren); </div>
<div> lastscene = chartScene;</div>
<div> sizeX = (viewports[4*i+2] - viewports[4*i]) * 800;</div>
<div> sizeY = (viewports[4*i+3] - viewports[4*i+1]) * 640;</div>
<div> chartScene->SetGeometry(sizeX, sizeY);</div>
<div> </div>
<div>…</div>
<div> </div>
<div>iren->Initialize();</div>
<div>cout << "Print() Output of last scene before rendering" << endl;</div>
<div>lastscene->Print(cout);</div>
<div>renwin->Render();</div>
<div>cout << "Print() Output of last scene after rendering" << endl;</div>
<div>lastscene->Print(cout);</div>
<div>iren->Start();</div>
<div> </div>
<div>…</div>
<div> </div>
<div>Output is:</div>
<div> </div>
<div>Print() Output of last scene before rendering</div>
<div>vtkContextScene (030798A0)</div>
<div> Debug: Off</div>
<div> Modified Time: 2084</div>
<div> Reference Count: 1</div>
<div> Registered Events:</div>
<div> Registered Observers:</div>
<div> vtkObserver (0307A388)</div>
<div> Event: 2</div>
<div> EventName: DeleteEvent</div>
<div> Command: 030783C0</div>
<div> Priority: 0</div>
<div> Tag: 2</div>
<div> vtkObserver (0307A368)</div>
<div> Event: 2</div>
<div> EventName: DeleteEvent</div>
<div> Command: 03076858</div>
<div> Priority: 0</div>
<div> Tag: 1</div>
<div> Widthxheight: 400 320</div>
<div> </div>
<div>Print() Output of last scene after rendering</div>
<div>vtkContextScene (030798A0)</div>
<div> Debug: Off</div>
<div> Modified Time: 3056</div>
<div> Reference Count: 1</div>
<div> Registered Events:</div>
<div> Registered Observers:</div>
<div> vtkObserver (0307A388)</div>
<div> Event: 2</div>
<div> EventName: DeleteEvent</div>
<div> Command: 030783C0</div>
<div> Priority: 0</div>
<div> Tag: 2</div>
<div> vtkObserver (0307A368)</div>
<div> Event: 2</div>
<div> EventName: DeleteEvent</div>
<div> Command: 03076858</div>
<div> Priority: 0</div>
<div> Tag: 1</div>
<div> Widthxheight: 800 640</div>
<div> </div>
<div>So in the first case the 400 X 320 pixel geometry is what I expected, since for that last scene the viewport 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> </div>
<div>So any ideas on that ? Am I doing something wrong here ?</div>
<div> </div>
<div>Thank you,</div>
<div>Daniel</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</font>
</body>
</html>