|
@@ -1566,53 +1566,40 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// </summary>
|
|
|
public void FullGraphMatch()
|
|
|
{
|
|
|
-
|
|
|
//全图匹配,首先要判断出来是按宽度来计算缩放,还是按高度来计算缩放
|
|
|
double thiswidth = this.Width;
|
|
|
double thisheight = this.Height;
|
|
|
- double imagewidth = m_backRect.Width;
|
|
|
- double imageheight = m_backRect.Height;
|
|
|
|
|
|
- //如果宽已相等rect在thisheight范围内,是宽度匹配已经达到目的,或是高已相等rect在thiswidth范围内,是高度匹配已经达到目的
|
|
|
- if ((thiswidth == imagewidth && thisheight > imagewidth) || (thisheight == imageheight && thiswidth > imagewidth))
|
|
|
- {
|
|
|
- //已经达到目的不操作,返回
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
- //判断当前是否宽度匹配未达到全图匹配效果
|
|
|
- if (thiswidth == imagewidth && thisheight < imageheight)
|
|
|
- {
|
|
|
- //说明目前已经达到了宽度匹配,但是未能显示完全整图需要高度匹配
|
|
|
- HeightMatch();
|
|
|
- m_f_zoom_mix = m_zoom_record;
|
|
|
- return;
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
- //判断当前是否高度匹配未达到全图匹配效果
|
|
|
- if (thisheight == imageheight && thiswidth < imagewidth)
|
|
|
+ double imagewidth = imageDisHelper.m_originalBackRect.Width;
|
|
|
+ double imageheight = imageDisHelper.m_originalBackRect.Height;
|
|
|
+ double zoom_FullGraph = 0;
|
|
|
+ if ((thiswidth == imagewidth && thisheight > imagewidth) || (thisheight == imageheight && thiswidth > imagewidth))
|
|
|
{
|
|
|
- //说明目前已经达到了高度匹配,但是未能显示完全的整图需要宽度匹配
|
|
|
- WidthMatch();
|
|
|
- m_f_zoom_mix = m_zoom_record;
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
ls_d_cz_width = Math.Abs(thiswidth / imagewidth);
|
|
|
ls_d_cz_height = Math.Abs(thisheight / imageheight);
|
|
|
|
|
|
- //应该是看谁差的倍数大就按谁的进行调整,而不只能看高宽的差值
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if ((1 - ls_d_cz_width) > (1 - ls_d_cz_height))
|
|
|
{
|
|
|
- //宽差大,就调用WidthMate
|
|
|
- WidthMatch();
|
|
|
+ zoom_FullGraph= ls_d_cz_width;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- //高差大,则调用HightMate
|
|
|
- HeightMatch();
|
|
|
+ zoom_FullGraph = ls_d_cz_height;
|
|
|
}
|
|
|
+ ImageZoom((float)zoom_FullGraph, new PointF(0, 0));
|
|
|
+
|
|
|
+ int ls_x = (int)(this.Width - m_backRect.Width) / 2;
|
|
|
+ MoveImageToPoint(new PointF(ls_x, 0));
|
|
|
m_f_zoom_mix = m_zoom_record;
|
|
|
}
|
|
|
|
|
@@ -1884,6 +1871,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
private void ExportoriginalspliceToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
|