<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Roger,<br>
I've just tested the UTF8 patch, and yes it also works in my case.<br>
This is great, it seems that all these characters problems (shadow +
accentuated characters) are solved now.<br>
Hopefully, these patches will be included in the next release.<br>
Thanks a lot for your help.<br>
Pof<br>
<br>
Le 08/09/2010 22:21, Roger Bramon Feixas a écrit :
<blockquote
cite="mid:AANLkTim6yAi5b=6s=NRA4hPD3=_XaN1fPvfmhB5DogOb@mail.gmail.com"
type="cite"><span class="Apple-style-span" style="font-family:
arial,sans-serif; font-size: 13px; border-collapse: collapse;
color: rgb(34, 34, 34);">Thank you Pof to test it! Now, I hope
it will be applied to the dev branch.
<div><br>
</div>
<div>Yes, the problem with accentuated characters is already
solved. Therefore, next VTK release will not have that
problem. However, if you are interested on it now, you can
apply this patch: <a moz-do-not-send="true"
href="http://vtk.org/gitweb?p=VTK.git;a=patch;h=331a44656276882766248c1f8e338434b40226ef"
target="_blank" style="color: rgb(53, 66, 88);">http://vtk.org/gitweb?p=VTK.git;a=patch;h=331a44656276882766248c1f8e338434b40226ef</a>.</div>
<div><br>
</div>
<div>Let me know if it works.</div>
<div><br>
</div>
<div><font color="#888888">Roger</font></div>
</span><br>
<div class="gmail_quote">On Wed, Sep 8, 2010 at 1:18 PM, pof <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:jd379252@gmail.com">jd379252@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Hi Roger,<br>
I applied your patch to vtk5.6.0, and this fully solve the
shadow problem, great!<br>
Still I 've got this problem with accuentuated characters
(which of course was your patch was aiming to solve). If I
understand well your reponse, this is already solved in the
dev branch, am I correct?<br>
Pof<br>
<br>
Le 06/09/2010 08:52, Roger Bramon Feixas a écrit :
<div>
<div class="h5">
<blockquote type="cite">Hi Pof,
<div><br>
</div>
<div>Since VTK 5.2.0, vtkTextActor is rendered using
glyphs instead of OpenGL. I also had that problem
but it was solved in that commit <a
moz-do-not-send="true"
href="http://vtk.org/gitweb?p=VTK.git;a=commit;h=331a44656276882766248c1f8e338434b40226ef"
target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commit;h=331a44656276882766248c1f8e338434b40226ef</a>
when UTF8 text rendering was enabled. It's after VTK
5.6 was released.</div>
<div><br>
</div>
<div>On the other hand, I suppose you still have
problems rendering text with shadow, as you reported
in that issue: <a moz-do-not-send="true"
href="http://vtk.org/Bug/view.php?id=9618"
target="_blank">http://vtk.org/Bug/view.php?id=9618</a>.
I tried to solve it and I attached a patch in that
issue waiting for feedback. It would be wonder if
you could test it and let me know if it works well.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Roger</div>
<div><br>
<br>
<div class="gmail_quote">On Fri, Sep 3, 2010 at 2:12
PM, Pof <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:jd379252@gmail.com"
target="_blank">jd379252@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">Hi all,<br>
<br>
I am having trouble displaying accentuated
characters in vtkTextActor with vtk5.6.0 under
MS-VC++2005.<br>
Here below is an exemple that reproduces the
problem, by printing the same string than
contains accents "é,è,à".<br>
When I run this small prog, as a result I obtain
that accentuated characters (é,è...) are :<br>
- correctly displayed when used in a
vtkScalarBarActor title,<br>
- not displayed when incorporated in
vtkTextActor.<br>
<br>
Any idea where does this come from and how to
solve it?<br>
<br>
As an additional comment, this used to work
correctly under vtk5.0.x, it is only broken from
vtk5.2.x up to vtk5.6.0.<br>
<br>
Thanks<br>
JD<br>
<br>
<br>
//////////////////////////////////////////////////////<br>
////////////////// vtkTextActor bug
//////////////////<br>
//////////////////////////////////////////////////////<br>
#include "vtkActor.h"<br>
#include "vtkRenderer.h"<br>
#include "vtkRenderWindow.h"<br>
#include "vtkRenderWindowInteractor.h"<br>
#include "vtkCamera.h"<br>
#include "vtkTextProperty.h"<br>
#include "vtkTextActor.h"<br>
#include "vtkActor2D.h"<br>
#include "vtkLookupTable.h"<br>
#include "vtkScalarBarActor.h"<br>
<br>
int main()<br>
{<br>
// Tested string<br>
char text[] = "Test: é, è, à";<br>
<br>
// Create an example text actor<br>
vtkTextActor *textActor =
vtkTextActor::New();<br>
textActor->SetInput(text);<br>
textActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();<br>
textActor->SetPosition(0.50,0.50);<br>
textActor->GetTextProperty()->SetFontSize(30);<br>
textActor->GetTextProperty()->SetJustificationToCentered();<br>
textActor->GetTextProperty()->SetColor(1,
0, 0);<br>
<br>
// Create a Lut<br>
vtkLookupTable *Lut = vtkLookupTable::New();<br>
Lut->SetHueRange (160.0/240.0, 0.0);<br>
Lut->SetSaturationRange (1.0, 1.0);<br>
Lut->SetValueRange (1.0, 1.0);<br>
Lut->SetTableRange (0,100);<br>
Lut->Build();<br>
<br>
// Create a ScalarBarActor<br>
vtkScalarBarActor *scalarBar =
vtkScalarBarActor::New();<br>
scalarBar->SetTitle(text);<br>
scalarBar->SetLookupTable(Lut);<br>
scalarBar->SetHeight(0.5);<br>
scalarBar->SetWidth(0.1);<br>
scalarBar->SetPosition(0.10,0.01);<br>
scalarBar->SetPosition2(0.80,0.1);<br>
scalarBar->SetOrientationToHorizontal();<br>
<br>
// Create the graphics structure<br>
vtkRenderer *ren = vtkRenderer::New();<br>
vtkRenderWindow *renWin =
vtkRenderWindow::New();<br>
renWin->AddRenderer(ren);<br>
renWin->SetSize(600, 600);<br>
vtkRenderWindowInteractor *iren =
vtkRenderWindowInteractor::New();<br>
iren->SetRenderWindow(renWin);<br>
<br>
// Add the actors to the renderer, set the
background and size<br>
ren->AddActor(textActor);<br>
ren->AddActor(scalarBar);<br>
ren->SetBackground(0.1, 0.2, 0.4);<br>
ren->ResetCamera();<br>
ren->GetActiveCamera()->Zoom(1.0);<br>
renWin->Render();<br>
<br>
// Starts the event loop<br>
iren->Start();<br>
<br>
// Do some cleaning<br>
textActor->Delete();<br>
Lut->Delete();<br>
scalarBar->Delete();<br>
ren->Delete();<br>
renWin->Delete();<br>
iren->Delete();<br>
<br>
return 0;<br>
}<br>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK
FAQ at: <a moz-do-not-send="true"
href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>