Hi David,<div>Thanks for your answer. Below is the function that includes line 313 of
vtkPBFEAView.cpp. </div><div><br></div><div><div>vtkSmartPointer<vtkScalarBarWidget> AddPBFEABar(vtkLookupTable& lut,const char* label, int x, double y) </div><div>{</div><div> vtkSmartPointer<vtkScalarBarActor> barActor;</div>
<div> barActor.TakeReference(vtkScalarBarActor::New()); </div><div> barActor->SetLookupTable(&lut);</div><div> barActor->SetTitle(label);</div><div> barActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();</div>
<div> if(false) </div><div> {</div><div> barActor->SetOrientationToVertical();</div><div> barActor->GetPositionCoordinate()->SetValue(0.02,0.3);</div><div> barActor->GetPosition2Coordinate()->SetValue(0.08,0.7);</div>
<div> }</div><div> else</div><div> {</div><div> barActor->SetOrientationToHorizontal();</div><div> barActor->GetPositionCoordinate()->SetValue(0.2,0.1);</div><div> barActor->GetPosition2Coordinate()->SetValue(0.6,0.08);</div>
<div> }</div><div> barActor->GetTitleTextProperty()->SetColor(0,0,0); </div><div> barActor->GetTitleTextProperty()->ShadowOff(); </div><div> barActor->GetTitleTextProperty()->ItalicOff();</div>
<div> barActor->GetTitleTextProperty()->SetFontFamilyToArial(); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>barActor->GetLabelTextProperty()->SetFontFamilyToArial(); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>barActor->GetLabelTextProperty()->ItalicOff(); </div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>barActor->GetLabelTextProperty()->ShadowOff(); </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>barActor->GetLabelTextProperty()->BoldOff();</div>
<div> //barActor->GetLabelTextProperty()->SetFontSize(8);</div><div> barActor->GetLabelTextProperty()->SetColor(0,0,0);</div><div> barActor->SetLabelFormat("%-#10.3f");</div><div> return barActor;</div>
<div>}</div><div><br></div><div>return barActor is the line 313.</div><br><div class="gmail_quote">On Fri, Jun 22, 2012 at 5:12 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> What I want to know is do we need to make code changes like these at every<br>
> time we upgrade our vtk version?<br>
<br>
</div>It depends. Things change in every release, especially in major<br>
releases (5.10->6.0).<br>
vtkScalarBarWidget for example moved to a new class hierarchy when the<br>
widgets were restructured to give them more capabilities.<br>
Compare:<br>
<a href="http://www.vtk.org/doc/release/5.0/html/a01987.html" target="_blank">http://www.vtk.org/doc/release/5.0/html/a01987.html</a><br>
and<br>
<a href="http://www.vtk.org/doc/release/5.8/html/a01855.html" target="_blank">http://www.vtk.org/doc/release/5.8/html/a01855.html</a><br>
The bigger the version gap, the more likely it is that you will run<br>
into incompatibilities.<br>
<br>
We are getting better at documenting what the changes are to make<br>
upgrading easier, but could stand improvement in this regard.<br>
See:<br>
<a href="http://www.vtk.org/Wiki/VTK#Summary_of_Changes" target="_blank">http://www.vtk.org/Wiki/VTK#Summary_of_Changes</a><br>
<br>
Back to the code:<br>
Can you post .\vtk\vtkPBFEAView.cpp(313) and a few lines arounds it,<br>
as well as the declaration of bar_actor_?<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div></div><font color="#666666">Gish</font><br>
</div>