Пример #1
0
 internal static GMSpriteImage FromExisting(Guid id, GMSpriteFrame frame, GMSpriteImageLayer layer)
 {
     return(new GMSpriteImage(frame, layer)
     {
         Id = id
     });
 }
Пример #2
0
 internal static GMSpriteImage Create(GMSpriteFrame frame, GMSpriteImageLayer layer)
 {
     return(new GMSpriteImage(frame, layer)
     {
         Id = Guid.NewGuid(),
         image = new Bitmap(frame.Sprite.Width, frame.Sprite.Height)
     });
 }
Пример #3
0
        private GMSpriteImage(GMSpriteFrame frame, GMSpriteImageLayer layer)
        {
            if (frame == null)
            {
                throw new ArgumentNullException(nameof(frame));
            }

            Frame = frame;
            Layer = layer;
            image = null;
        }