This commit is contained in:
2010-08-04 15:17:19 +00:00
parent 1d5a43627c
commit 935802a57a
13 changed files with 151 additions and 188 deletions

View File

@@ -584,9 +584,9 @@ namespace XYPlots
CalculateSlopes(dataPoints);
else
LineFlag = STRAIGHT;
#if DEBUG
ShowPoints(dataPoints);
#endif
//#if DEBUG
//ShowPoints(dataPoints);
//#endif
AddAPlot(dataPoints);
}
private double FindSlope(point first, point last)
@@ -1219,7 +1219,9 @@ namespace XYPlots
delta2 = delta1 * sin_deg(theta1) / sin_deg(theta2);
r2 = Math.Floor(0.5 + r2 - delta2);
cp2 = FindModifiedCenter(r2, pt2.APoint, t2);
DebugOutput("DrawArc1"); VG_Arc.iColor = 1;
//#if DEBUG
//DebugOutput("DrawArc1"); VG_Arc.iColor = 1;
//#endif
DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput);
DebugShowLocation("DrawArc1");
MoveTo(pt2.APoint);
@@ -1232,7 +1234,9 @@ namespace XYPlots
}
else
{
DebugOutput("DrawArc2"); VG_Arc.iColor = 2;
//#if DEBUG
//DebugOutput("DrawArc2"); VG_Arc.iColor = 2;
//#endif
DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput);
DebugShowLocation("DrawArc2");
}
@@ -1254,8 +1258,10 @@ namespace XYPlots
else
{
//Console.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}", t3, t3a, t4, t4a, thetaa, t1, t2, r1, r2, aryIdx);
DebugOutput("DrawArc3"); VG_Arc.iColor = 3;
VG_Arc.iColor = 4;
//#if DEBUG
//DebugOutput("DrawArc3"); VG_Arc.iColor = 3;
//VG_Arc.iColor = 4;
//#endif
DrawArc(r1, t1, t1 + theta1, cp1, x, y, pg, vgOutput);
//Console.WriteLine("'DrawArc3','{0}',{1},{2}", Key, r1, theta1);
DebugShowLocation("DrawArc3");
@@ -1290,8 +1296,10 @@ namespace XYPlots
}
else
{
DebugOutput("DrawArc5"); VG_Arc.iColor = 5;
VG_Arc.iColor = 6;
//#if DEBUG
//DebugOutput("DrawArc5"); VG_Arc.iColor = 5;
//VG_Arc.iColor = 6;
//#endif
DrawArc(r2, t2, t2 - theta2, cp2, x, y, pg, vgOutput);
DebugShowLocation("DrawArc5");
}
@@ -1789,7 +1797,9 @@ namespace XYPlots
{
LoadBuffFromString(PlotCommands);
Setup();
VG.VG_Arc.iColor = 0;
//#if DEBUG
//VG.VG_Arc.iColor = 0;
//#endif
}
public void Setup()
{
@@ -1865,21 +1875,21 @@ namespace XYPlots
}
private void ShowPoints(DataPoints dataPoints)
{
#if DEBUG
foreach (DataPoint pl in dataPoints)
{
DebugOutput("x={0},y={1},slope={2}", pl.APoint.xyValue[0], pl.APoint.xyValue[1], pl.slope);
}
#endif
//#if DEBUG
//foreach (DataPoint pl in dataPoints)
//{
// DebugOutput("x={0},y={1},slope={2}", pl.APoint.xyValue[0], pl.APoint.xyValue[1], pl.slope);
//}
//#endif
}
public static string Key = "";
private void DebugOutput(string format, params object[] args)
{
#if DEBUG
//#if DEBUG
//if (args.Length == 0)
// Console.WriteLine("'{0}','{1}'",Key,format);
//Console.WriteLine(format, args);
#endif
//#endif
}
private void DebugShowLocation(string command)
{