Hi,
We tried to do this
We found that, when tmpLine = 22.6768
Test Point will be
+ [0] {X = 22.6768 Y = 0.0} System.Drawing.PointF
+ [1] {X = 22.726799 Y = 0.0} System.Drawing.PointF
+ [2] {X = 22.726799 Y = 612.0} System.Drawing.PointF
+ [3] {X = 22.6768 Y = 612.0} System.Drawing.PointF
Wondering why the value for X are not all the same?
We did check on some other numbers like tmpLine=28.346, it gave no issue @ all.
Please advise.
We tried to do this
float tmpLine = (float)lpX.Value;
Aurigma.GraphicsMill.WinControls.LineVObject lpLine = new Aurigma.GraphicsMill.WinControls.LineVObject(tmpLine, 0, tmpLine, _workingMultilayerViewer.WorkspaceHeight * 72);
lpLine.Pen.Width = 0.1f;
lpLine.Brush = null;
PointF[] test = GetTransformedCornerPoints(lpLine);
_workingMultilayerViewer.Layers[0].VObjects.Add(lpLine);
private System.Drawing.PointF[] GetTransformedCornerPoints(Aurigma.GraphicsMill.WinControls.VObject obj)
{
System.Drawing.RectangleF baseRect = obj.GetVObjectBounds();
System.Drawing.PointF[] cornerPnts = new System.Drawing.PointF[4];
try
{
cornerPnts[0] = baseRect.Location;
cornerPnts[1] = new System.Drawing.PointF(baseRect.Right, baseRect.Top);
cornerPnts[2] = new System.Drawing.PointF(baseRect.Right, baseRect.Bottom);
cornerPnts[3] = new System.Drawing.PointF(baseRect.Left, baseRect.Bottom);
obj.Transform.TransformPoints(cornerPnts);
}
catch (Exception ex)
{
}
finally
{
}
return cornerPnts;
}
We found that, when tmpLine = 22.6768
Test Point will be
+ [0] {X = 22.6768 Y = 0.0} System.Drawing.PointF
+ [1] {X = 22.726799 Y = 0.0} System.Drawing.PointF
+ [2] {X = 22.726799 Y = 612.0} System.Drawing.PointF
+ [3] {X = 22.6768 Y = 612.0} System.Drawing.PointF
Wondering why the value for X are not all the same?
We did check on some other numbers like tmpLine=28.346, it gave no issue @ all.
Please advise.