예제 #1
0
        /// <summary>
        /// Draw the sprite projected on a rectangle.
        /// </summary>
        public void Draw(ComplexRectangle rect, int frameIndex = 0, int depth = 0)
        {
            if (!Loaded)
                throw new NotLoadedException();

            Rectangle sourceRect = new Rectangle(GetIndexLocation(frameIndex), FrameSize);
            DrawX.DrawJobs.Add(new TextureDrawJob(depth, rect.GetEnclosingRectangle(), TextureHandle, sourceRect, rect));
        }
예제 #2
0
        /// <summary>
        /// Texture job.
        /// </summary>
        public TextureDrawJob(int depth, Rectangle area, IntPtr texture, Rectangle sourceRect, ComplexRectangle destRect)
            : this()
        {
            Texture    = texture;
            SourceRect = sourceRect;
            DestRect   = destRect;

            Depth = depth;
            Area  = area;
        }
예제 #3
0
        /// <summary>
        /// Texture job.
        /// </summary>
        public TextureDrawJob(int depth, Rectangle area, IntPtr texture, Rectangle sourceRect, ComplexRectangle destRect)
            : this()
        {
            Texture = texture;
            SourceRect = sourceRect;
            DestRect = destRect;

            Depth = depth;
            Area = area;
        }
예제 #4
0
        public void Draw(ComplexRectangle rect, int frameIndex = 0, int depth = 0)
        {
            if (!Loaded)
            {
                throw new NotLoadedException();
            }

            Rectangle sourceRect = new Rectangle(GetIndexLocation(frameIndex), FrameSize);

            DrawX.DrawJobs.Add(new TextureDrawJob(depth, rect.GetEnclosingRectangle(), TextureHandle, sourceRect, rect));
        }
예제 #5
0
 public ComplexRectangle(ComplexRectangle rect)
     : this(rect._Position, rect._Size, rect._origin, rect._Rotation)
 {
 }
예제 #6
0
 public ComplexRectangle(ComplexRectangle rect)
     : this(rect._Position, rect._Size, rect._Origin, rect._Rotation)
 {
 }