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

Alok alok.theanomaly at gmail.com
Tue Oct 21 17:04:58 EDT 2014


I cloned the git repo some time time back and built from source
The vtkTextActor/vtkTextWidget seem to be working fine with unicode but I
see some other problems which make them unusable for me.

Any recommendations on how to check the difference between
vtkCornerAnnotation and the vtkTextActor will be great. Seems like an easy
fix

Thanks

On Tue, Oct 21, 2014 at 4:49 PM, Sean McBride <sean at rogue-research.com>
wrote:

> 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
>
>
>


-- 
I live a simple life...  in 0s and 1s !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141021/a7d57c82/attachment.html>


More information about the vtkusers mailing list