OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

vtkLegendBoxActor is not supporting to set text font size

  • Thread starter Thread starter Jish
  • Start date Start date
J

Jish

Guest
I am using vtkLegendBoxActor to show legends in a plot. However, I am unable to control the font size of text in the legend. I have tried the following:

Code:
legendActor=vtkLegendBoxActor()
textProp=vtkTextProperty()
textProp.SetFontSize(3)
textProp.SetVerticalJustificationToCentered()
legendActor.SetEntryTextProperty(textProp)

However, this does not seem to set the font size of the text. It still appears with the default size of 12. I have checked the font size after setting the property as:

Code:
legendActor.GetEntryTextProperty().GetFontSize()

which returns 3. Please help me to fix the issue.

Thank you.
<p>I am using vtkLegendBoxActor to show legends in a plot. However, I am unable to control the font size of text in the legend.
I have tried the following:</p>
<pre><code>legendActor=vtkLegendBoxActor()
textProp=vtkTextProperty()
textProp.SetFontSize(3)
textProp.SetVerticalJustificationToCentered()
legendActor.SetEntryTextProperty(textProp)
</code></pre>
<p>However, this does not seem to set the font size of the text. It still appears with the default size of 12. I have checked the font size after setting the property as:</p>
<pre><code>legendActor.GetEntryTextProperty().GetFontSize()
</code></pre>
<p>which returns 3. Please help me to fix the issue.</p>
<p>Thank you.</p>
 

Latest posts

A
Replies
0
Views
1
Alfredo Augusto Petri
A
Top