CalcPosPoint Precision Error
Posted: Wed Jun 02, 2010 4:24 pm
Hi,
After drawing a series (Polygon), I extracted (X,Y) positions but found there was a differece from the original value with about 0.05 in my case.
I used the following code:
void GetPolygonPoints(IMapPolygonPtr tPolygon, ITChartPtr Chart)
{
IPointArrayPtr vertexPts = tPolygon->GetPoints;
PointD vertPt(0.0,0.0);
for(int i=0; i<vertexPts->Count; i++)
{
vertPt.x = Chart->Axis->Bottom->CalcPosPoint((long)vertexPts->Item->GetX());
vertPt.y = Chart->Axis->Left->CalcPosPoint((long)vertexPts->Item->GetY());
}
}
Is this a known issue or did I do something wrong?
Or is this because I used Polygon?
Dongsu
After drawing a series (Polygon), I extracted (X,Y) positions but found there was a differece from the original value with about 0.05 in my case.
I used the following code:
void GetPolygonPoints(IMapPolygonPtr tPolygon, ITChartPtr Chart)
{
IPointArrayPtr vertexPts = tPolygon->GetPoints;
PointD vertPt(0.0,0.0);
for(int i=0; i<vertexPts->Count; i++)
{
vertPt.x = Chart->Axis->Bottom->CalcPosPoint((long)vertexPts->Item->GetX());
vertPt.y = Chart->Axis->Left->CalcPosPoint((long)vertexPts->Item->GetY());
}
}
Is this a known issue or did I do something wrong?
Or is this because I used Polygon?
Dongsu