瀏覽代碼

修改三元图的显示,增加标尺

zhangjiaxin 2 年之前
父節點
當前提交
36e922995a
共有 1 個文件被更改,包括 18 次插入3 次删除
  1. 18 3
      OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

+ 18 - 3
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -1863,7 +1863,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             SolidBrush sbrush_White = new SolidBrush(Color.White);
             g.FillRectangle(sbrush_White, 0, 0, 530, 530);
 
-            Pen mypen = new Pen(Color.Black, 2);
+            Pen mypen = new Pen(Color.Black, 1);
             g.DrawImage(map, 0, 0, map.Width, map.Height);
             g.DrawLine(mypen, new Point(Line + 10, Line), new Point(Line / 2 + 10, Convert.ToInt32(Line - (Line / 2 * 1.732))));//"\"
             g.DrawLine(mypen, new Point(Line / 2 + 10, Convert.ToInt32(Line - (Line / 2 * 1.732))), new Point(0 + 10, Line));//"/"
@@ -1883,12 +1883,14 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 int x2_a = Line - (43 * i);
                 int y1_a = point * i;
                 g.DrawLine(mypen, new Point(x1_a + 10, x2_a), new Point(y1_a + 10, Line));
+               
 
                 //"/"
                 int x1_b = Line - (point / 2 + ((point / 2) * (i - 1)));
                 int x2_b = Line - (43 * i);
                 int y1_b = Line - (point * i);
                 g.DrawLine(mypen, new Point(x1_b + 10, x2_b), new Point(y1_b + 10, Line));
+               
 
                 //"_"
                 int x1_c = point / 2 + ((point / 2) * (i - 1));
@@ -1898,6 +1900,19 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 int y2_c = Line - (43 * i);
 
                 g.DrawLine(mypen, new Point(x1_c + 10, x2_c), new Point(y1_c + 10, y2_c));
+                
+
+
+
+                g.DrawLine(mypen, new Point(y1_a + 10, Line + 10), new Point(y1_a + 10, Line));
+                g.DrawLine(mypen, new Point(x1_b + 10, x2_b), new Point(x1_b + 10 + 10, x2_b));
+                g.DrawLine(mypen, new Point(x1_c + 10 - 10, x2_c), new Point(y1_c + 10, y2_c));
+
+                g.DrawString((i * 10).ToString(), new Font("宋体", 8, FontStyle.Bold), new SolidBrush(Color.Black), new Point(x1_c  - 20, x2_c-5));
+
+                g.DrawString((i * 10).ToString(), new Font("宋体", 8, FontStyle.Bold), new SolidBrush(Color.Black), new Point(y1_b , Line+8));
+
+                g.DrawString(((10-i) * 10).ToString(), new Font("宋体", 8, FontStyle.Bold), new SolidBrush(Color.Black), new Point(x1_b + 20, x2_b-5));
             }
 
             for (int i = 0; i < dt_point_sort.Rows.Count; i++)
@@ -1912,7 +1927,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             Font Font_features = new Font("宋体", 10, FontStyle.Bold);
             SolidBrush sbrush = new SolidBrush(Color.Black);
-            g.DrawString("features:" + dt_point_sort.Rows.Count.ToString(), Font_features, sbrush, 350, 200);
+            g.DrawString("features:" + dt_point_sort.Rows.Count.ToString(), Font_features, sbrush, 400, 200);
 
 
 
@@ -1921,7 +1936,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             g.DrawString(TemplateName.Split('.')[0].ToString(), myFont, sbrush, 265 - (TemplateName.Split('.')[0].ToString().Length * 10 / 2), 45);//顶点名字
             g.DrawString(TemplateName.Split('.')[1].ToString(), myFont, sbrush, 0, 510);//左侧名字
             g.DrawString(TemplateName.Split('.')[2].ToString(), myFont, sbrush, 500 - (TemplateName.Split('.')[0].ToString().Length * 10), 510);//左侧名字
-                                                                                                                                      //           map.Save("D:\\1.bmp");
+            //map.Save("D:\\1.bmp");
             #endregion
 
             return map;