Beispiel #1
0
 private void ButtonLoad_Click(object sender, EventArgs e)
 {
     if (open.ShowDialog() != System.Windows.Forms.DialogResult.OK)
         return;
     sprite = Sprite.Load(open.FileName); //("sprite.xml")
     graph.Clear();
     RefreshBitmap();
 }
Beispiel #2
0
 public FormSprite()
 {
     InitializeComponent();
     graph = new Graph(picture.Width, picture.Height);//высоту и ширину берем прямо из элемента picturebox1 окна программы.
     sprite = new Sprite();
     picture.Image = graph.bmp;
     currLine.x1 = -1;
 }
Beispiel #3
0
 //Метод для рисования всех линий сразу.
 public void Draw(Sprite sprite)
 {
     foreach (MyLine line in sprite.lines)
         Draw(line);
 }