コード例 #1
0
ファイル: Sprite.cs プロジェクト: villermen/hatless-engine
        /// <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
ファイル: Sprite.cs プロジェクト: slagusev/HatlessEngine
        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)
 {
 }