예제 #1
0
 private void DrawDomain()
 {
     ClearWindow();
     GraphicFunctions.DrawNodes(polygon.ToArray(), g, false);
     GraphicFunctions.DrawPolygon(polygon.ToArray(), g);
     pictureBox1.Image = btm;
 }
예제 #2
0
        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            Point point = new Point(e.X, e.Y);
            Node  node  = GraphicFunctions.ConvertToOwn(point);

            toolStripStatusLabel1.Text = "[ " + node.ToString() + " ]";
        }
예제 #3
0
 private void DrawMesh()
 {
     ClearWindow();
     GraphicFunctions.DrawGrid(domain.mesh, g);
     if (config.HasAdditionalPoint)
     {
         GraphicFunctions.DrawNodes(domain.mesh.nodes.ToArray(), g, config.IsNumberedNode);
     }
     pictureBox1.Image = btm;
 }
예제 #4
0
 private void DrawResult()
 {
     ClearWindow();
     pallette = new Pallette(u.Min(), u.Max());
     foreach (Triangle tr in domain.mesh.triangles)
     {
         GraphicFunctions.FillTriangle(g, domain.mesh.nodes[tr.IndexA], domain.mesh.nodes[tr.IndexB], domain.mesh.nodes[tr.IndexC],
                                       u[tr.IndexA], u[tr.IndexB], u[tr.IndexC], pallette);
     }
     pictureBox1.Image = btm;
 }
예제 #5
0
 private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
 {
     if (mode == ProgramMode.DrawMode)
     {
         Point point = new Point(e.X, e.Y);
         Node  node  = GraphicFunctions.ConvertToOwn(point);
         polygon.AddVertex(node);
         GraphicFunctions.DrawNode(node, g, false, 0);
         pictureBox1.Image = btm;
     }
 }
예제 #6
0
 void frm_OnListBox1Changed()
 {
     DrawDomain();
     GraphicFunctions.DrawPolygonEdge(polygon, frm.curSelected, g);
     pictureBox1.Image = btm;
 }