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)); }
/// <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)); } } }
/// <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)); } } }
/// <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)); } } }
/// <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)); } } }
public Character Get(int x, int y) { return(_renderer.Get(x, y)); }