|
@@ -158,6 +158,46 @@ namespace OTSIncAReportGraph
|
|
|
return i_SortGridHeight;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取计算Grid分栏的高度(排列图)zjx
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public float GetSoirtRealGridHeiht()
|
|
|
+ {
|
|
|
+
|
|
|
+ //设置增长的x,y轴值,+3是跳过边框的位置, 可能有个别情况,会在右侧突出占到边框的位置上
|
|
|
+ float f_ls_x = this.m_rectf.X + 3;
|
|
|
+ float f_ls_y = this.m_rectf.Y + 3;
|
|
|
+ float rectf_height = 0;
|
|
|
+ foreach (DisplayParticle dp in this.list_dparticle)
|
|
|
+ {
|
|
|
+ //判断颗粒是否显示
|
|
|
+ if (dp.GetPaintState() != PaintState.NOPAINT)
|
|
|
+ {
|
|
|
+ //判断颗粒位置是否超过Grid边界
|
|
|
+ if ((f_ls_x + dp.GetShowRect().Width + 6) > this.m_rectf.Width + this.m_rectf.X)
|
|
|
+ {
|
|
|
+ //还原x到该分栏Grid的左边框+3的位置,并且将y轴定位到下一高度的y轴位置
|
|
|
+ f_ls_x = this.m_rectf.X + 3;
|
|
|
+ f_ls_y = f_ls_y + rectf_height + 10;
|
|
|
+ }
|
|
|
+ //找到每行最长的颗粒
|
|
|
+ if (rectf_height < dp.GetShowRect().Height)
|
|
|
+ {
|
|
|
+ rectf_height = dp.GetShowRect().Height;
|
|
|
+ }
|
|
|
+ //定位好该多边形后,对x轴进行增长,为下一个多边形定位好位置
|
|
|
+ f_ls_x = f_ls_x + dp.GetShowRect().Width + 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //输出Y的高加上最后一行最长颗粒的高,得到Grid分栏所需要的高
|
|
|
+ return f_ls_y + rectf_height;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 根据传入的2个多边形list,从大到小进行排序,两个多边形list通过guid保持一致
|
|
|
/// 主要用于计算list与old_list能进行相同顺序的排序
|
|
@@ -335,6 +375,8 @@ namespace OTSIncAReportGraph
|
|
|
//设置增长的x,y轴值,+3是跳过边框的位置, 可能有个别情况,会在右侧突出占到边框的位置上
|
|
|
float f_ls_x = this.m_rectf.X + 3;
|
|
|
float f_ls_y = this.m_rectf.Y + 3 ;
|
|
|
+
|
|
|
+ float rectf_height = 0;
|
|
|
foreach (DisplayParticle dp in this.list_dparticle)
|
|
|
{
|
|
|
//这里要对不显示的颗粒进行屏蔽,也就是进行不计算位置,不知道会不会有其它的影响
|
|
@@ -349,8 +391,18 @@ namespace OTSIncAReportGraph
|
|
|
{
|
|
|
//还原x到该分栏Grid的左边框+3的位置,并且将y轴定位到下一高度的y轴位置
|
|
|
f_ls_x = this.m_rectf.X + 3 ;
|
|
|
- f_ls_y = f_ls_y + this.GetSortGridHeight() / this.GetDParticleRowNumber() - 5;//在获取高度时,已经+10,所以这里再-5,颗粒近一些
|
|
|
+
|
|
|
+ f_ls_y = f_ls_y + rectf_height + 10;
|
|
|
+
|
|
|
+ //f_ls_y = f_ls_y + this.GetSortGridHeight() / this.GetDParticleRowNumber() - 5;//在获取高度时,已经+10,所以这里再-5,颗粒近一些
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rectf_height< dp.GetShowRect().Height)
|
|
|
+ {
|
|
|
+ rectf_height = dp.GetShowRect().Height;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//计算出与定位的Grid的差值,然后重新排序线,用分栏Grid-颗粒的外Rect,取到x,y的差值
|
|
|
float f_cz_x = f_ls_x - dp.GetShowRect().X;
|