[vtkusers] Change properties of axis titles for a vtkCubeAxesRepresentation

Bill Lorensen bill.lorensen at gmail.com
Mon Aug 12 07:56:10 EDT 2013


GetTitleTextProperty requires an argument specifying an axis.
The code you provided does not compile.
Try
this->CubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0);
this->CubeAxesActor->GetTitleTextProperty(0)->GetColor(); // Print 1.0 0.0
0.0
this->CubeAxesActor->GetTitleTextProperty(0)->SetFontFamily(VTK_ARIAL);
this->CubeAxesActor->GetTitleTextProperty(0)->GetFontFamily(); // Print
VTK_ARIAL

works for me.



On Mon, Aug 12, 2013 at 5:28 AM, Sébastien PULVERAIL
<skeleton18 at gmail.com>wrote:

> Hi,
>
> I have been trying to change the properties (color and font) of the title
> axes for a vtkCubeAxesRepresentation using the setter functions.
>
> But, nothing changed in the representation. However, when I call the
> getter functions, the changes have been made.
>
> Is there some kind of an update function, or a modified one that I need to
> call?
>
> Here is the piece of code I use:
> this->CubeAxesActor->GetTitleTextProperty()->SetColor(1.0, 0.0, 0.0);
> this->CubeAxesActor->GetTitleTextProperty()->GetColor(); // Print 1.0 0.0
> 0.0
> this->CubeAxesActor->GetTitleTextProperty()->SetFontFamily(VTK_ARIAL);
> this->CubeAxesActor->GetTitleTextProperty()->GetFontFamily(); // Print
> VTK_ARIAL
>
> Thanks in advance.
> Seb
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130812/a7181798/attachment.htm>


More information about the vtkusers mailing list