<div class="gmail_quote">On Thu, Jan 21, 2010 at 6:16 AM, Rakesh Patil <span dir="ltr"><<a href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br><br>I have implemented vector plot for unstructured grid.. Now i want to display a legend showing the min arrow size and max arrow size along with the min and max vector magnitude..<br><br>To put a legend i made use of vtkLegendBoxActor as shown in the following example<br>
<br><a href="http://www.vtk.org/Wiki/VTK/Examples/Legend" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Legend</a><br><br>But am failing to display an arrow with two different sizes. i.e. a small arrow and a big arrow. Following <br>
is the code i used<br><br>vtkSmartPointer<vtkArrowSource> bigArrow = vtkSmartPointer<vtkArrowSource>::New();<br><br>vtkSmartPointer<vtkPolyData> bigArrowPoly = bigArrow->GetOutput();<br><br>similarly one more set of arrow source and polydata I have declared and added to the renderer..<br>
<br>I am getting two arrows, but how do i change the size of these arrows..??<br><br>Thanks in Advance<br>Rakesh Patil<br><br><br></blockquote><div><br></div><div>I would change the size of an arrow using a scaling transform and vtkTransformPolyDataFilter : <a href="http://www.vtk.org/doc/nightly/html/classvtkTransformPolyDataFilter.html">http://www.vtk.org/doc/nightly/html/classvtkTransformPolyDataFilter.html</a></div>
<div><br></div><div>However, at around line 600 of vtkLegendBoxActor.cxx, everything seems to be resized anyway, so I don't think what you're trying to do is possible using the current legend code.</div><div><br></div>
<div>Anyone disagree?</div><div><br></div></div><div>Thanks,<br><br>David</div>