JS的立体图还没弄,今天只弄了QT的三维图和三角图,还有JS的大卫三角图,因为前端的同事也需要用这个图谱,只能给他们写一个JS版本的,脑壳痛
绘制流程:
1、根据导则的边界范围计算出相应的点
2、绘制出填充
3、绘制坐标轴
4、绘制图像标记
render() {
this.CalcLocaltion();
this.DrawBackground("谱图:大卫三角");
this.DrawPolygon(this.context, this.poly_triangle, 'transparent', 'black');
this.DrawAreaLines();
this.DrawAreaBrush();
this.Draw_Axis_CH4();
this.Draw_Axis_C2H4();
this.Draw_Axis_C2H2();
this.DrawLine(this.context, this.pd_txt_p_a, this.pd_txt_p_b, 'black');
this.context.font = '18px Arial';
this.context.fillStyle = 'black';
this.context.fillText("PD",this.pd_txt_p_b.x,this.pd_txt_p_b.y);
this.DrawLine(this.context, this.t1_txt_p_a, this.t1_txt_p_b, 'black');
this.context.fillText("T1",this.t1_txt_p_b.x,this.t1_txt_p_b.y);
this.DrawLine(this.context,