我借鑑了控制線在我的Windows窗體上是這樣的:如何在對象上繪製虛線?
// Get Graphics object from chart
Graphics graph = e.ChartGraphics.Graphics;
PointF point1 = PointF.Empty;
PointF point2 = PointF.Empty;
// Set Maximum and minimum points
point1.X = -110;
point1.Y = -110;
point2.X = 122;
point2.Y = 122;
// Convert relative coordinates to absolute coordinates.
point1 = e.ChartGraphics.GetAbsolutePoint(point1);
point2 = e.ChartGraphics.GetAbsolutePoint(point2);
// Draw connection line
graph.DrawLine(new Pen(Color.Yellow, 3), point1, point2);
我想知道是否有可能繪製虛線(點)行,而不是常規的實線的?
感謝以至於你能告訴我,我怎麼會納入我的代碼 – 2011-05-23 17:24:54
@I這:PLZ看我的編輯。但請注意。我沒有通過編譯器運行,所以可能會出現語法和意圖錯誤。無論如何,應該讓你關閉。 – 2011-05-23 17:35:15