<!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">
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 :
<blockquote
cite="mid:AANLkTim5jXms0PTxuq3j55YxVjMUt_Euq50dpabHX3Nn@mail.gmail.com"
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">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">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">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>
</body>
</html>