zedgraphcontrol坐標系里怎么獲取滑鼠坐標?利用mousedown事件是滑鼠左鍵坐標獲取的是zedgraph的控制元件坐標,而不是我自定義的坐標系,怎么滑鼠在控制元件中的坐標轉換到自定義坐標系里?
private float x3 = 0;
private float y3 = 0;
private float x4 = 0;
private float y4 = 0;
private bool ZedGraphControl4_MouseDownEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e)
{
x3 = 0;
y3 = 0;
x4 = 0;
y4 = 0;
zedGraphControl4.IsEnableZoom = true;
x3 = e.X;
y3 = e.Y;
return default(bool);
}
private bool ZedGraphControl4_MouseUpEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e)
{
if (checkBox13.Checked)
{
zedGraphControl4.IsEnableZoom = true;
}
else
{
zedGraphControl4.IsEnableZoom = false;
x4 = e.X - x3;
y4 = e.Y - y3;
}
return default(bool);
}
private bool ZedGraphControl4_MouseMoveEvent(ZedGraph.ZedGraphControl sender, MouseEventArgs e)
uj5u.com熱心網友回復:
不懂,可能需要自己換算轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/256450.html
標籤:C語言
上一篇:藍橋杯 擴散python實作
