   Precision 1 Pixel Vector Translation along Cross Product Normal
  Hello Friends,I am trying to draw precision 1 pixel polygon outline for given polygon coordinates. Suppose one of the edge is denoted by (x1,y1)-(x2,y2).What I want to do is translate this edge outwards along it's edge normal vector "exactly by 1 pixel"This is what I thought up to now.1) Get the edge X1,Y1-X2,Y22) Get the Cross Product of this edge (Perpendicular vector)3) Normalize the Cross Product Vector4) Add this Normal (Unit Vector) to the edge X1,Y1-X2,Y2But I am missing something in the algorithm.I want to determine new coordinates to draw the new edge which perfectly outlines the original edge coordinates.   nx2,ny2  x2,y2 o  o /  /   /  /New  -----> /<----> /   <-----Original polygon edgecalculated / 1 pix /polygon   /  /edgeo  onx1,ny1   x1,y1Note that the distance between the polygon edge vertices and new calculated polygon edge vertices is "exactly 1 pixel". This should remain 1 pixel constant for any polygon orientation.How can I acheive this ? I am using VB6 with GDI32 polygon API.Please reply.   
  If I understand correctly, surely you would add the normalised vector you produce to each end of the original edge (treat end positions as vectors) to produce the two ends of the new edge rather than to the edge vector itself? Adding it to the edge vector would produce an edge between the origin of the original edge and the point formed by moving from the original edge end-point by the normal vector.if N is your normalised perpendicular vector then:(nx1,ny1)=(x1,y1)+N(nx2,ny2)=(x2,y2)+NNew edge = (nx2,ny2)-(nx1,ny1)   ;  Thanks Aardvajk,It does work, but it is leaving gaps at certain polygon orientations (rotations). May be rounding problem by GDI32 ! I will try using GDI+ which has floating value data type for polygon coordinates and lines.Thanks a lot.   