2011-05-23 29 views
1

#繪製文本我正在畫虛線在使用這種方法的對象:下在一個對象

// 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 (dashed) connection line 
     float[] dashValues = { 4, 2 }; 
     Pen dashPen= new Pen(Color.Yellow, 3); 
     dashPen.DashPattern = dashValues; 
     graph.DrawLine(dashPen, point1, point2); 

,我想知道是否有可能在物體上以同樣的方式/寫入文本。 ??

回答