[vtkusers] Differences in display of vtkTextActors between vtk5.0.4 and vtk5.4.2 (shadow and accentuated characters) ??

Pof jd379252 at gmail.com
Tue Sep 29 11:15:33 EDT 2009


Hi,
Thanks for your answer.
I've uploaded the images there:
  vtk5.0.4  :   http://imageshare.web.id/images/z1t2jtdrbpv7ojvp7k0g.jpg
  vtk5.4.2  :   http://imageshare.web.id/images/ezy0ff8fbjifnt739qz.jpg
and I will fill a bug report
Cheers


Bill Lorensen a écrit :

I've resolved the shadow differences. Between vtk5.0 and vtk5.2, the
text rendering was changed to use texture maps. There were a few bugs
in the new implementation. I guess there were no regression tests to
catch this.

I also found a bug on the 5.0, 5.2 (and 5.4!) versions of
vtkTextProperty. The Shadow offsets were being ignored. In all of VTK,
the SetShadowOffset has never been tested (shame on us!).

I have not checked in the changes yet since I need to do more testing.

As for the accent problem, I have not resolved that one yet.

The images you posted in the older email are no longer available. Can
you repost them?

I'll keep you informed on progress.

BWT, can you file a bug report at http://www.vtk.org/Bug/view_all_bug_page.php

Include your small example.

Bill


On Wed, Sep 23, 2009 at 4:35 PM, pof <jd379252 at gmail.com> wrote:

Hi vkt'ers

actually I've already submitted almost the same post on 2009/01/11 (see
http://www.vtk.org/pipermail/vtkusers/2009-January/098973.html), same
problem but now
with vtk5.4.2 (was vtk5.2.1 in the previous post).
I was hoping that this problem would have disappeared in the latest release,
unfortunately this is not the case.

Here is a small description again:

I'am trying to upgrade from vtk5.0.4 to vtk5.4.2 .
I end up with two problems when rendering vtkTextActor.
Basically :
- the shadow property looks rather strange in 5.4.2 (and 5.2.1) compared to
5.0.4
- accuentuated characters (é, è...) are no longer displayed in 5.4.2 (and
5.2.1)

Note : all vtk version were compiled with VC++2005 under WinVista, with the
same options.

I can hardly believe that I am the only one that is having this problem,
although I admit this occurs only with non standard characters
(accentuated).

So my question again:
- any idea where this behaviour change comes from?
- any hint to solve it?

Thanks in advance

-------------------

Below a small test that reproduce the problem.

//
// test for vtkTextActor
//
#include "vtkActor.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkCamera.h"
#include "vtkTextProperty.h"
#include "vtkTextActor.h"

int main()
{
  // Create an example text actor.
  vtkTextActor *textActor = vtkTextActor::New();

textActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
  textActor->SetPosition(0.50,0.50);
  textActor->SetInput("vtk5.0.4\n\nCharacters without accents\n\nCaractères
accentués");
  textActor->GetTextProperty()->SetFontSize(40);
  textActor->GetTextProperty()->SetFontFamilyToArial();
  textActor->GetTextProperty()->SetJustificationToCentered();
  textActor->GetTextProperty()->BoldOn();
  textActor->GetTextProperty()->ItalicOn();
  textActor->GetTextProperty()->ShadowOn();
  textActor->GetTextProperty()->SetColor(1, 0, 0);

  // Create the graphics structure.
  vtkRenderer *ren = vtkRenderer::New();
  vtkRenderWindow *renWin = vtkRenderWindow::New();

  renWin->AddRenderer(ren);
  renWin->SetSize(600, 600);

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
  iren->SetRenderWindow(renWin);

  // Add the actor to the renderer, set the background and size
  ren->AddActor(textActor);
  ren->SetBackground(0.1, 0.2, 0.4);
  ren->ResetCamera();
  ren->GetActiveCamera()->Zoom(1.0);
  renWin->Render();

  // This starts the event loop and as a side effect causes an initial
render.
  iren->Start();

  // Exiting from here, we have to delete all the created instances
  textActor->Delete();
  ren->Delete();
  renWin->Delete();
  iren->Delete();

  return 0;
}

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090929/e931f63e/attachment.htm>


More information about the vtkusers mailing list