[vtkusers] Displaying the degree symbol "\u00B0" in vtkCornerAnnotation

Sean McBride sean at rogue-research.com
Tue Oct 21 16:49:24 EDT 2014


On Tue, 21 Oct 2014 12:46:15 -0400, Alok said:

>I have been trying for a while to display a degree symbol in
>vtkCornerAnnotation.
>
>The way I am trying to do it is like this:
>std;:string angle = computeAngle()+"\u00B0";
>cornerAnnotation->SetText(3,angle.c_str()); //where cornerAnnotation if of
>type vtkCornerAnnotation.
>
>This displays something like 50° rather than 50°
>When I display the string on a terminal it works as expected.

In the past, VTK hasn't had very good Unicode support.  I'm not sure where it stands today actually.  What version of VTK are you using?  You'll have the best results with the newest version I expect.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtkusers mailing list