<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT face=Arial size=2>Hi! I think this method don't work: 
vtkActor2D-&gt;GetPosition2Coordinate-&gt;SetValue(x,y,z).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This is my code (a simple straight 
line):</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>/*This should draw a diagonal in the left-bottom 
quarter of the window, but the diagonal crosses the whole screen.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#include "vtkActor2D.h"<BR>#include 
"vtkRenderWindow.h"<BR>#include "vtkRenderer.h"<BR>#include 
"vtkRenderWindowInteractor.h"<BR>#include "vtkPolyDataMapper2D.h"<BR>#include 
"vtkProperty2D.h"<BR>#include "vtkPolyData.h"<BR>#include 
"vtkPoints.h"<BR>#include "vtkCellArray.h"<BR>#include 
"vtkCamera.h"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>int main(int argc, char *argv[]){</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; vtkPolyData 
*linea=vtkPolyData::New();<BR>&nbsp;&nbsp;&nbsp; vtkPoints 
*puntos=vtkPoints::New();<BR>&nbsp;&nbsp;&nbsp; vtkCellArray 
*lineas=vtkCellArray::New();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper2D 
*mapper=vtkPolyDataMapper2D::New();<BR>&nbsp;&nbsp;&nbsp; vtkActor2D 
*actor=vtkActor2D::New();<BR>&nbsp;&nbsp;&nbsp; vtkRenderer 
*render=vtkRenderer::New();<BR>&nbsp;&nbsp;&nbsp; vtkRenderWindow 
*ventana=vtkRenderWindow::New();<BR>&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor 
*interac=vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;&nbsp; vtkCoordinate 
*coor=vtkCoordinate::New();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
lineas-&gt;InsertNextCell(2);<BR>&nbsp;&nbsp;&nbsp; 
lineas-&gt;InsertCellPoint(0);<BR>&nbsp;&nbsp;&nbsp; 
lineas-&gt;InsertCellPoint(1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
puntos-&gt;InsertPoint(0,0.0,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp; 
puntos-&gt;InsertPoint(1,1.0,1.0,0.0);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
linea-&gt;SetPoints(puntos);<BR>&nbsp;&nbsp;&nbsp; 
linea-&gt;SetLines(lineas);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
coor-&gt;SetCoordinateSystemToNormalizedViewport();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
mapper-&gt;SetInput(linea);<BR>&nbsp;&nbsp;&nbsp; 
mapper-&gt;SetTransformCoordinate(coor);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
actor-&gt;SetMapper(mapper);<BR>&nbsp;&nbsp;&nbsp; 
actor-&gt;GetProperty()-&gt;SetColor(1.0,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp; 
actor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<BR>&nbsp;&nbsp;&nbsp; 
actor-&gt;GetPosition2Coordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<BR>&nbsp;&nbsp;&nbsp; 
//actor-&gt;GetPosition2Coordinate()-&gt;SetReferenceCoordinate(NULL);<BR>&nbsp;&nbsp;&nbsp; 
</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
actor-&gt;GetPositionCoordinate()-&gt;SetValue(0.0,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp; 
<STRONG>actor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.5,0.5,0.0); // 
ĦĦĦHere!!!</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;render-&gt;AddActor2D(actor);<BR>&nbsp;&nbsp;&nbsp; 
render-&gt;SetBackground(0.1,0.2,0.4);<BR>//&nbsp;&nbsp;&nbsp; 
render-&gt;ResetCamera();<BR>//&nbsp;&nbsp;&nbsp; 
render-&gt;ResetCameraClippingRange();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
ventana-&gt;AddRenderer(render);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
interac-&gt;SetRenderWindow(ventana);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
ventana-&gt;Render();<BR>&nbsp;&nbsp;&nbsp; interac-&gt;Start();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
linea-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; 
puntos-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; lineas-&gt;Delete();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
mapper-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; 
actor-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; 
render-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; 
ventana-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; 
interac-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp; coor-&gt;Delete();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; return 
0;}</FONT></DIV></DIV></BODY></HTML>