View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000558VTK(No Category)public2004-01-30 17:442011-01-13 17:00
ReporterMathieu Malaterre 
Assigned ToMathieu Malaterre 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000558: vtkCaptionActor2D with border
DescriptionHi all,

*************************************************
After adding a viewport to a renderer and using
vtkCaptionActor2D with border, I have noticed
that the border is drawn with an offset.

Is there a way to change this ?
*************************************************

You can find my materials from:
http://dods.ipsl.jussieu.fr/brocksce/vtk_pb03 [^]

Edit TestCaptionActor.tcl and
uncomment line 48
#ren1 SetViewport 0.2 0.2 0.8 0.8

Will produce caption_2.png image.
Without any change the script produces caption_1.png

Hope that someone could help on this.
TagsNo tags attached.
Project
Type
Attached Files? file icon TestCaptionActor.tcl [^] (1,194 bytes) 1969-12-31 19:00
png file icon caption_1.png [^] (22,114 bytes) 1969-12-31 19:00


png file icon caption_2.png [^] (13,067 bytes) 1969-12-31 19:00


? file icon vtkCaptionActor2D.patch1 [^] (699 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0000589)
Mathieu Malaterre (developer)
2004-01-30 17:48

Additional url:
http://vtk.org/pipermail/vtkusers/2002-December/015181.html [^]
(0001271)
Vladan Bato (reporter)
2004-07-15 12:35

I think this bug is due to the fact that in vtkCaptionActor2D the position of the caption is computed in display coordinates, and these are used for the points in BorderPolyData.
vtkPolyDataMapper2D, however, expects the points to be in viewport coordinates.
The solution to this (I haven't tried it) is to use a vtkCoordinate, that will transform from display to viewport coordinates, and set it in BorderMapper (by calling SetTransformCoordinate()) in vtkCaptionActor2D::New().

Another approach is to get viewport coordinates when setting the points of BorderPolyData in RenderOpaqueGeometry().

Note: The documentation of PolyDataMapper2D is misleading, as it uses the term 'local display coordinates' for what are actually viewport coordinates.
(0001282)
Vladan Bato (reporter)
2004-07-20 05:53

I uploaded a patch for this bug.
This is a patch against rev. 1.23 of vtkCaptionActor2D.cxx (the latest on the 4.2 branch).
It can however be applied to rev. 1.27 and 1.28 too (the latest on the 4.2 branch and on the main trunk at this moment).

See my previous comment for an explanation of the fix.
(0001283)
Mathieu Malaterre (developer)
2004-07-20 14:28

$ cvs ci vtkCaptionActor2D.cxx
Checking in vtkCaptionActor2D.cxx;
/cvsroot/VTK/VTK/Hybrid/vtkCaptionActor2D.cxx,v <-- vtkCaptionActor2D.cxx
new revision: 1.29; previous revision: 1.28
done


I'll enter a feature request for your other patch.

 Issue History
Date Modified Username Field Change
2010-11-29 17:59 Mathieu Malaterre Source_changeset_attached => VTK master 1214b9df
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team