[vtkusers] Change properties of axis titles for a vtkCubeAxesRepresentation

Bill Lorensen bill.lorensen at gmail.com
Mon Aug 12 10:13:02 EDT 2013


I just changed this example to illustrate how to set axis properties:
http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CubeAxesActor

NOTE: the tarball will not be updated until tonight but you can still
cut/paste the code from the wiki page.

Bill



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

> Yes, Sorry.. I don't copy-paste my code because it's confidential, and I
> forgot to put the index for the GetTitleTextProperty function.
>
> 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.
>
> Thanks in advance.
>
> Seb
>
>
> On Mon, Aug 12, 2013 at 1:56 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
>
>> 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
>>
>
>


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


More information about the vtkusers mailing list