Exemplo n.º 1
0
        public Character Get(int x, int y)
        {
            if (x < 0 || x > Width - 1 || y < 0 || y > Height - 1)
            {
                return(Character.Blank);
            }

            return(_renderer.Get(_startX + x, _startY + y));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Draw part of a renderer to this renderer.
        /// </summary>
        public static void DrawImagePartial(this ITextRenderer renderer, int x, int y, ITextRenderer image, uint startX, uint startY, uint width, uint height)
        {
            if (x < -width || x > renderer.Width || y < -height || y > renderer.Height)
            {
                return;
            }

            for (var yy = 0; yy < height; yy++)
            {
                for (var xx = 0; xx < width; xx++)
                {
                    renderer.Set(x + xx, y + yy, image.Get((int)startX + xx, (int)startY + yy));
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Draw a renderer to this renderer.
        /// </summary>
        public static void DrawImage(this ITextRenderer renderer, int x, int y, ITextRenderer image)
        {
            if (x < -image.Width || x > renderer.Width || y < -image.Height || y > renderer.Height)
            {
                return;
            }

            for (var yy = 0; yy < image.Height; yy++)
            {
                for (var xx = 0; xx < image.Width; xx++)
                {
                    renderer.Set(x + xx, y + yy, image.Get(xx, yy));
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Draw part of a renderer to this renderer.
        /// </summary>
        public static void DrawImagePartial(this ITextRenderer renderer, int x, int y, ITextRenderer image, uint startX, uint startY, uint width, uint height)
        {
            if (x < -width || x > renderer.Width || y < -height || y > renderer.Height)
                return;

            for (var yy = 0; yy < height; yy++)
            {
                for (var xx = 0; xx < width; xx++)
                {
                    renderer.Set(x + xx, y + yy, image.Get((int)startX + xx, (int)startY + yy));
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Draw a renderer to this renderer.
        /// </summary>
        public static void DrawImage(this ITextRenderer renderer, int x, int y, ITextRenderer image)
        {
            if (x < -image.Width || x > renderer.Width || y < -image.Height || y > renderer.Height)
                return;

            for (var yy = 0; yy < image.Height; yy++)
            {
                for (var xx = 0; xx < image.Width; xx++)
                {
                    renderer.Set(x + xx, y + yy, image.Get(xx, yy));
                }
            }
        }
Exemplo n.º 6
0
 public Character Get(int x, int y)
 {
     return(_renderer.Get(x, y));
 }