Esempio n. 1
0
            public void Normalize(Size parentSize)
            {
                Rectangle rect = Rectangle.Intersect(new Rectangle(Offset, SrcRectangle.Size), new Rectangle(new Point(), parentSize));

                if (rect.IsEmpty)
                {
                    BaseImage = null;
                    return;
                }
                Offset.X            = rect.X;
                Offset.Y            = rect.Y;
                SrcRectangle.Width  = rect.Width;
                SrcRectangle.Height = rect.Height;
            }
Esempio n. 2
0
        internal bool AddFrame(AbstractImage parentImage, Rectangle rect, Point pos, int delay)
        {
            AnimeFrame frame = new AnimeFrame();

            frame.index        = FrameList.Count;
            frame.BaseImage    = parentImage;
            frame.SrcRectangle = rect;
            frame.Offset       = pos;
            if (delay <= 0)
            {
                delay = 1;
            }
            frame.DelayTimeMs = delay;
            frame.Normalize(DestBaseSize);
            totaltime += delay;
            FrameList.Add(frame);
            return(true);
        }
Esempio n. 3
0
 public ASpriteSingle(string name, AbstractImage img, Rectangle rect)
     : base(name, rect.Size)
 {
     SrcRectangle = rect;
     BaseImage    = img;
 }
Esempio n. 4
0
 public void Dispose()
 {
     BaseImage = null;
 }
Esempio n. 5
0
 public override void Dispose()
 {
     BaseImage = null;
 }