Three View Classes Can't work in a same Canvas

Dear Experts

It seems that whenever I try to draw ViewCell, ViewDrift, ViewField to a same TCanvas there will only be two of them. It works fine if I try any combinations of two of them. I tried the Example wire2d in Elmer and only get the view of geometry and drift line, also in my own code the same thing happens.
Any clues…?

I think @hschindl can help.

for the wire2d example it works for me with the attached slightly modified version of the program. (3.3 KB)

But it may indeed not work out of the box in other situations. If you have another example where it doesn’t work, please post a minimal working version and I’ll take a look…

Thank you, here is the one, I believe I made some mistake to cause this problem… (25.9 KB)

By default, each View... object uses its own canvas. You need to set the canvas to be painted on explicitly (using the method SetCanvas) if you want to combine multiple plots on the same canvas.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.