<div dir="ltr">Yes, you're right: the vtkCubeAxesRepresentation does not allow me to have different colors for the axis and its title.. <div><br></div><div>That's why I implement a new class (here I will name it vtkCubeAxesRepresentation2) which inherits from vtkCubeAxesRepresentation.. </div>
<div>vtkCubeAxesRepresentation2 gives methods to change separately the colors of the axis and its title.</div></div><div class="gmail_extra"><br clear="all"><div>Seb</div>
<br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 3:08 PM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I was talking about the API on the representation not the CubeAxesActor. </div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 7:48 AM, Sébastien PULVERAIL <span dir="ltr"><<a href="mailto:skeleton18@gmail.com" target="_blank">skeleton18@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Seb,<div><br></div><div>I can assure you that you can have different colors between the axis and its title. I investigate a little bit more on my code..</div>
<div>If I execute the following code, only the label colors (blue) and the axis color (red) change. </div>
<div><br></div><div> this->CubeAxesActor->GetXAxesLinesProperty()->SetColor(1.0, 0.0, 0.0);<br></div> this->CubeAxesActor->GetTitleTextProperty(0)->SetColor(0.0, 1.0, 0.0);<div> this->CubeAxesActor->GetLabelTextProperty(0)->SetColor(0.0, 0.0, 1.0);</div>
<div><br></div><div>Then, just after, I run the following code:</div><div><br></div><div> this->CubeAxesActor->SetXTitle("X2");</div><div><br></div><div>And the title is correctly update, and the color (green) is also changed...</div>
<div><br><div><br><div>I already try the call to ->Modified() on first the vtkCubeAxesActor and then on the vtkCubeAxesRepresentation.. But nothing change on the view..<br><div class="gmail_extra"><br clear="all"><div>
Seb</div><div><div>
<br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 6:54 PM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Seb,<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">I don't think </span><span style="font-family:arial,sans-serif;font-size:13px">vtkCubeAxesRepresentation</span><span style="font-family:arial,sans-serif;font-size:13px"> allow you to have different color between the axis and its title. On top of that, to force the regeneration of the axes, you can call ->Modified() on the </span>vtkCubeAxesActor</div>
<div><br></div><div>Seb</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 11:11 AM, Sébastien PULVERAIL <span dir="ltr"><<a href="mailto:skeleton18@gmail.com" target="_blank">skeleton18@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Ok, thank you for your help.. But I didn't express correctly..<div>
<br></div><div>The people I work for make their own software based on the Paraview's plugins.. They use vtkCubeAxesRepresentation and vtkCubeAxisActor to make their cube axes.</div>
<div><br></div><div>They have a little bug when updating the color of the axis title: they can correctly instantiate a new cube axes (as in the example you gave me), but when they want to change the color of an axis directly from the GUI: the axis itself, the labels change color, but not the title.</div>
<div><br></div><div>So, it is not during the initialization that I have a problem, but when I want to change the color inside the GUI.</div><div><br></div><div>Sorry for the misunderstanding.</div>
</div><div class="gmail_extra"><br clear="all"><div>Seb</div><div><div>
<br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 4:13 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I just changed this example to illustrate how to set axis properties:<div><a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CubeAxesActor" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CubeAxesActor</a><br>
</div><div><br></div><div>NOTE: the tarball will not be updated until tonight but you can still cut/paste the code from the wiki page.</div><span><font color="#888888"><div><br></div><div>Bill</div><div><br>
</div></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 8:02 AM, Sébastien PULVERAIL <span dir="ltr"><<a href="mailto:skeleton18@gmail.com" target="_blank">skeleton18@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Yes, Sorry.. I don't copy-paste my code because it's confidential, and I forgot to put the index for the GetTitleTextProperty function.<div><br></div><div>Can you provide me the code to show how you test it please? By this way, I will be able to compare with my own code.</div>
<div><br></div><div>Thanks in advance.</div></div><div class="gmail_extra"><br clear="all"><div>Seb</div><div><div>
<br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 1:56 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">GetTitleTextProperty requires an argument specifying an axis.<div>The code you provided does not compile.</div><div>Try</div><div><div style="font-size:13px;font-family:arial,sans-serif">
this->CubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0);<br></div><div style="font-size:13px;font-family:arial,sans-serif">this->CubeAxesActor->GetTitleTextProperty(0)->GetColor(); // Print 1.0 0.0 0.0</div>
<div style="font-size:13px;font-family:arial,sans-serif">this->CubeAxesActor->GetTitleTextProperty(0)->SetFontFamily(VTK_ARIAL);</div><div style="font-size:13px;font-family:arial,sans-serif">
this->CubeAxesActor->GetTitleTextProperty(0)->GetFontFamily(); // Print VTK_ARIAL</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">
works for me.</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Aug 12, 2013 at 5:28 AM, Sébastien PULVERAIL <span dir="ltr"><<a href="mailto:skeleton18@gmail.com" target="_blank">skeleton18@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>
I have been trying to change the properties (color and font) of the title axes for a vtkCubeAxesRepresentation using the setter functions.</div>
<div><br></div><div>But, nothing changed in the representation. However, when I call the getter functions, the changes have been made.</div>
<div><br></div><div>Is there some kind of an update function, or a modified one that I need to call?</div><div><br></div><div>Here is the piece of code I use:</div><div>this->CubeAxesActor->GetTitleTextProperty()->SetColor(1.0, 0.0, 0.0);<br>
</div><div>this->CubeAxesActor->GetTitleTextProperty()->GetColor(); // Print 1.0 0.0 0.0</div><div>this->CubeAxesActor->GetTitleTextProperty()->SetFontFamily(VTK_ARIAL);</div><div>this->CubeAxesActor->GetTitleTextProperty()->GetFontFamily(); // Print VTK_ARIAL</div>
<div><br></div><div>Thanks in advance.</div><div><div>Seb</div>
</div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div></div></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div> </div></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>