示例#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;
        }