Esempio n. 1
0
        internal Rectangle image_rectangle(PeiceRepresentation peice, Image image)
        {
            int tmpx, tmpy;

            return(new Rectangle(tmpx = image.Width * x_ofs / peice.Cols
                                 , tmpy = image.Height * y_ofs / peice.Rows
                                 , image.Width * (x_ofs + 1) / peice.Cols - tmpx
                                 , image.Height * (y_ofs + 1) / peice.Rows - tmpy));
        }
Esempio n. 2
0
 public void CreatePeice(PeiceRepresentation parent, int x, int y, Type peice_type, object parameter)
 {
     foreach (PeiceRepresentation peice in peices)
     {
         if (peice.GetType().Equals(peice_type))
         {
             Layer layer = new Layer(this, peice, x, y, parameter);
             layers.AddLast(layer);
             break;
         }
     }
 }