<!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>You may mean ".... instead of&nbsp; 1.0 1.0 0.0", do you? If yes, I answer: 
yes, <BR>i've tried and work OK, but I'm altering the cell's geometry. I'm using 
a <BR>similar code to draw a curve line, and that was the solution I've found at 
<BR>the moment: filtering the geometry data to normalized viewport values. But 
<BR>it would be easier if GetPosition2Coordinate worked! In fact, it works OK 
<BR>with vtkActor2D classes that are below it in the hierarchical tree. There's 
<BR>could be a bug...<BR><BR><BR>&gt; Hi Isidro,<BR>&gt;<BR>&gt; Have you tried 
setting your second point to 0.5, 0.5, 0 instead of 1.0, <BR>&gt; 1.0, 
1.0?<BR>&gt;<BR>&gt; - Amy<BR>&gt;<BR>&gt; Isidro Moreno 
wrote:<BR>&gt;&gt;&nbsp; Hi! I think this method _definitely doesn't work_: 
<BR>&gt;&gt; 
vtkActor2D-&gt;GetPosition2Coordinate-&gt;SetValue(x,y,z).<BR>&gt;&gt;&nbsp; 
This is my code (a simple straight line):<BR>&gt;&gt;&nbsp; /*This should draw a 
diagonal in the left-bottom quarter of the window, <BR>&gt;&gt; but the diagonal 
crosses the whole screen. If the commented lines below <BR>&gt;&gt; are enabled, 
the behaviour it's the same*/<BR>&gt;&gt;&nbsp; #include 
"vtkActor2D.h"<BR>&gt;&gt; #include "vtkRenderWindow.h"<BR>&gt;&gt; #include 
"vtkRenderer.h"<BR>&gt;&gt; #include "vtkRenderWindowInteractor.h"<BR>&gt;&gt; 
#include "vtkPolyDataMapper2D.h"<BR>&gt;&gt; #include 
"vtkProperty2D.h"<BR>&gt;&gt; #include "vtkPolyData.h"<BR>&gt;&gt; #include 
"vtkPoints.h"<BR>&gt;&gt; #include "vtkCellArray.h"<BR>&gt;&gt; #include 
"vtkCamera.h"<BR>&gt;&gt;&nbsp; int main(int argc, char 
*argv[]){<BR>&gt;&gt;&nbsp; vtkPolyData 
*linea=vtkPolyData::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; vtkPoints 
*puntos=vtkPoints::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; vtkCellArray 
*lineas=vtkCellArray::New();<BR>&gt;&gt;&nbsp; vtkPolyDataMapper2D 
*mapper=vtkPolyDataMapper2D::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkActor2D *actor=vtkActor2D::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderer *render=vtkRenderer::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderWindow 
*ventana=vtkRenderWindow::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderWindowInteractor 
*interac=vtkRenderWindowInteractor::New();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkCoordinate *coor=vtkCoordinate::New();<BR>&gt;&gt;&nbsp; 
lineas-&gt;InsertNextCell(2);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
lineas-&gt;InsertCellPoint(0);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
lineas-&gt;InsertCellPoint(1);<BR>&gt;&gt;&nbsp; 
puntos-&gt;InsertPoint(0,0.0,0.0,0.0);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
puntos-&gt;InsertPoint(1,1.0,1.0,0.0);<BR>&gt;&gt;&nbsp; 
linea-&gt;SetPoints(puntos);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
linea-&gt;SetLines(lineas);<BR>&gt;&gt;&nbsp; 
coor-&gt;SetCoordinateSystemToNormalizedViewport();<BR>&gt;&gt;&nbsp; 
mapper-&gt;SetInput(linea);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
mapper-&gt;SetTransformCoordinate(coor);<BR>&gt;&gt;&nbsp; 
actor-&gt;SetMapper(mapper);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
actor-&gt;GetProperty()-&gt;SetColor(1.0,0.0,0.0);<BR>&gt;&gt; <BR>&gt;&gt; 
actor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<BR>&gt;&gt; 
<BR>&gt;&gt; 
actor-&gt;GetPosition2Coordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
//actor-&gt;GetPosition2Coordinate()-&gt;SetReferenceCoordinate(NULL);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp; 
actor-&gt;GetPositionCoordinate()-&gt;SetValue(0.0,0.0,0.0);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
actor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.5,0.5,0.0); 
//ĦĦĦHere!!!<BR>&gt;&gt;&nbsp; 
render-&gt;AddActor2D(actor);<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
render-&gt;SetBackground(0.1,0.2,0.4);<BR>&gt;&gt; //&nbsp;&nbsp;&nbsp; 
render-&gt;ResetCamera();<BR>&gt;&gt; //&nbsp;&nbsp;&nbsp; 
render-&gt;ResetCameraClippingRange();<BR>&gt;&gt;&nbsp; 
ventana-&gt;AddRenderer(render);<BR>&gt;&gt;&nbsp; 
interac-&gt;SetRenderWindow(ventana);<BR>&gt;&gt;&nbsp; 
ventana-&gt;Render();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
interac-&gt;Start();<BR>&gt;&gt;&nbsp; 
linea-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
puntos-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
lineas-&gt;Delete();<BR>&gt;&gt;&nbsp; 
mapper-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
actor-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
render-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
ventana-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
interac-&gt;Delete();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
coor-&gt;Delete();<BR>&gt;&gt;&nbsp; return 0;}<BR></DIV></BODY></HTML>