Logo (vtkactor2d) on the top right

Dear all,

I would like to have the logo at the top right of my app even even if i minimize or maximize the windows.

My first version was like this:
logo->GetPositionCoordinate()->SetValue(0.77, 0.85);

The problem that i found is that when i minimize the windows, the logo is only shown half of it (it is cropped). It is a surprise as i am forcing to be in the 0.77 of the viewport, if i maximize the windows, it works well, it keeps this percentange, according to the whole viewport. Can it be a bug?

Then, to solve this what i did was to add an observer to the render windows and when there is a resize of the windows, it checks the actual size of the windows and updates the new position. It works. By now i get the width of the logo by hardcode. Someone knows how to get the width from the actor so that i can change the logo without changing this value?

And my final question, is there any other way to position the logo (vtkactor2d) more effciently without adding observers ??


1 Like