private void pictureBoxPreview_MouseMove(object sender, MouseEventArgs e)
{
if (m_activeElem == null) return;
m_trackBall.OnMouseMove(e);
if (e.Button == MouseButtons.Left)
{
m_creationData.Creator.ElemGeomDic[m_activeElem].Rotation *= m_trackBall.Rotation;
pictureBoxPreview.Refresh();
}
else if (e.Button == MouseButtons.Right)
{
m_creationData.Creator.ElemGeomDic[m_activeElem].Scale *= m_trackBall.Scale;
pictureBoxPreview.Refresh();
}
if (e.Button == MouseButtons.None)
{
ClearAllHighLight();
pictureBoxPreview.Refresh();
Matrix mat = (Matrix)m_centerMatrix.Clone();
mat.Invert();
PointF[] pts = new PointF[1] { e.Location };
mat.TransformPoints(pts);
ElementGeometry elemGeom = m_creationData.Creator.ElemGeomDic[m_activeElem];
foreach (Edge edge in m_creationData.Creator.SupportEdges[m_activeElem])
{
if (elemGeom.EdgeBindingDic.ContainsKey(edge))
{
if (elemGeom.EdgeBindingDic[edge].HighLight(pts[0].X, pts[0].Y))
{
pictureBoxPreview.Refresh();
}
}
}
}
}