[vtkusers] set caption leader color?

Maxwell, Thomas P. (GSFC-606.2)[SCIENCE SYSTEMS AND APPLICATIONS INC] thomas.maxwell at nasa.gov
Fri Aug 17 19:28:56 EDT 2012


The 3D leader does not show up at all in my scene.   The leader color is always white.  If it was the same color as text then there would be no problem- I can set the text color.  The only solution I can see at this point is to create my own custom CaptionActor in python and correct the problem there.   I was hoping to avoid this, as it is a lot of coding to fix one small oversight.

-- Tom
________________________________________
From: vtkusers-bounces at vtk.org [vtkusers-bounces at vtk.org] On Behalf Of Alex Malyushytskyy [alexmalvtk at gmail.com]
Sent: Friday, August 17, 2012 5:53 PM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] set caption leader color?

I have not used this class, but it seems does not provide access (keep
private and has no access methods) to LeaderActor2D or LeaderActor3D.
this probably means that you can't specify it.
At the same  vtkAxesActor and vtkLegendBoxActor provide such access.

It looks like it supposed to be  always colored with the same color as text.
If leader has different color, this is probably a bug and should be reported.

Have you tried to use vtkCaptionActor2D with 3D leader?
Does 2D and 3D leader have the same colors?

Alex



On Thu, Aug 16, 2012 at 8:31 AM, Maxwell, Thomas P.
(GSFC-606.2)[SCIENCE SYSTEMS AND APPLICATIONS INC]
<thomas.maxwell at nasa.gov> wrote:
> The vtkCaptionActor2D consists of a vtkTextActor with a border and an adjustable arrow attached to the border which is supposed to point at the feature that the caption refers to.   This arrow consists of a single line, referred to as the "leader" in the vtk source code, with a glyph used as the leader "head".   vtkCaptionActor2D extends vtkActor2D.   The (internal) leader actor is also a vtkActor2D.
>
> -- Tom
> ________________________________________
> From: vtkusers-bounces at vtk.org [vtkusers-bounces at vtk.org] On Behalf Of Alex Malyushytskyy [alexmalvtk at gmail.com]
> Sent: Wednesday, August 15, 2012 9:34 PM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] set caption leader color?
>
> Just to avoid further confusion, could you clarify what is a leader
> you are talking about.
> If it is part of vtkAxesActor , my advice below is correct.
>
> Alex
>
> On Wed, Aug 15, 2012 at 6:29 PM, Alex Malyushytskyy
> <alexmalvtk at gmail.com> wrote:
>> I misread, but if you want to setup color for "leader",
>> I assume you are talking about something like vtkAxesActor
>>
>> In this case you can do it as
>>
>>
>>         axesActor->GetXAxisShaftProperty ()->SetColor (0, 0, 0);
>>
>> // tip is a 'leader"
>>         axesActor->GetXAxisTipProperty ()->SetColor (0, 0, 0);
>>
>>
>>
>> Hope this helps.
>>
>>
>> Alex
>>
>>
>> On Wed, Aug 15, 2012 at 5:40 PM, Maxwell, Thomas P.
>> (GSFC-606.2)[SCIENCE SYSTEMS AND APPLICATIONS INC]
>> <thomas.maxwell at nasa.gov> wrote:
>>> Thanks, Alex, but I tried this and it only sets the properties of the
>>> caption text- it does not affect the border and the leader.   I also tried
>>> setting the attributes of the BorderProperty associated with the
>>> vtkCaptionRepresentation, but that seems to have no effect.
>>>
>>> -- Tom
>>>
>>>
>>>
>>> On 8/15/12 7:25 PM, "Alex Malyushytskyy" <alexmalvtk at gmail.com> wrote:
>>>
>>>>    vtkSmartPointer<vtkTextProperty> textprop =
>>>>vtkSmartPointer<vtkTextProperty>::New();
>>>>       textprop->BoldOff();
>>>>       textprop->SetFontSize( 18 );
>>>>       textprop->SetFontFamilyToTimes();
>>>>       textprop->SetColor(0, 0, 0);
>>>>
>>>>aptionActor2D()->SetCaptionTextProperty( textprop );
>>>>
>>>
> _______________________________________________
> 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
_______________________________________________
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



More information about the vtkusers mailing list