This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Can't get pixel coordinates from VObject Points

In my code I am doing this to extract the point data from a vector object:


for (int i = 0; i < myOutlineVObject.Points.Length; i++)
{
          // this data gets saved to disk:
          float x = myOutlineVObject.Points[i].X;
          float y = myOutlineVObject.Points[i].Y;
}


However the points do not come up as pixel coordinates. Even though I have the MultiLayerViewer control set to Unit.Pixel from the very beginning.

What am I missing here?
Hello,

Unit.Pixel property doesn't affect on coordinates of the VObjects, they are always measured in points. So you should convert them into pixels by yourself (in most cases it will be: points * 96 / 72 = pixels)