<div dir="ltr"><div>Fernando,</div><div><br></div>Because you are using a scalar bar actor from ParaView, I suggest using the vtkContext2DScalarBarActor. Font sizes are fixed in this scalar bar actor implementation.<div><br></div><div>HTH,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 9:33 AM, Fernando Nellmeldin <span dir="ltr"><<a href="mailto:f.nellmeldin@open-engineering.com" target="_blank">f.nellmeldin@open-engineering.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">Hello.<div><br><div>I know that this issue was discussed many times before in this list, but I can't find a way to do what I want. I'm using VTK 7.1.1 (under Windows). So maybe there were some improvements. </div><div><br></div><div>In fact, I'm using vtkPVScalarBarActor which includes some very well welcomed improvements, but the discussion should apply also to the normal vtkScalarBarActor.</div><div><a href="https://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/classvtkPVScalarBarActor.html" target="_blank">https://www.paraview.org/<wbr>ParaView/Doc/Nightly/www/cxx-<wbr>doc/classvtkPVScalarBarActor.<wbr>html</a><br></div><div><br></div><div>The issue is that the size of the labels for values depends on the viewport. So when the viewport changes the size, the labels also change their size. Is it possible to avoid this? I would like to set the size of the labels as constant or at least to define a maximum/minimum size, because sometimes it gets veeeeery small/big and it is not very pleaseant.</div><div><br></div><div>Thank you!<br></div><div><br></div><div>PS: </div><div>Here's my code to configure the vtkPVScalarBarActor, in case it's useful... (I guess there are some calls that are useless):</div><div><br></div><div><div><font face="monospace, monospace">vtkSmartPointer<<wbr>vtkPVScalarBarActor> scalarBarActor = vtkSmartPointer<<wbr>vtkPVScalarBarActor>::New();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetPositionCoordinate()-><wbr>SetCoordinateSystemToDisplay()<wbr>;<span style="white-space:pre-wrap">   </span></font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetPositionCoordinate()-><wbr>SetValue(20, 20, 0.0);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetAddRangeAnnotations(0);</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>DrawTickMarksOff();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>UnconstrainedFontSizeOff();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>AnnotationTextScalingOn();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetFixedAnnotationLeaderLineCo<wbr>lor(true);<br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetOrientationToVertical();</font></div><div><font face="monospace, monospace">//scalarBarActor->SetWidth(0.<wbr>1); // width in viewport coordinates</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetMaximumWidthInPixels(80);</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetLabelTextProperty()-><wbr>BoldOff();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetLabelTextProperty()-><wbr>ItalicOff();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetLabelTextProperty()-><wbr>ShadowOn();</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>AutomaticLabelFormatOff();</font></div><div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetLabelFormat("%.2f");</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetRangeLabelFormat(<wbr>scalarBarActor-><wbr>GetLabelFormat());</font></div></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetMaximumNumberOfColors(100);<br></font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetNumberOfLabels(5);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetLookupTable(tempLUT); // defined elsewhere, doesn't matter</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">scalarBarActor->SetTitle("<wbr>Displacements");</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>SetTitleJustification(VTK_<wbr>TEXT_RIGHT);</font></div><div><font face="monospace, monospace">scalarBarActor-><wbr>GetTitleTextProperty()-><wbr>SetFontSize(8);</font></div><div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div>