示例#1
0
 public AsciiPaintEventArgs(AsciiGraphics graphics, Rectangle clipRect)
 {
     Graphics = graphics;
     ClipRectangle = clipRect;
 }
示例#2
0
 public static AsciiGraphics FromUnManagedConsole()
 {
     var fromUnManagedConsole = new AsciiGraphics(new UnManagedConsoleRenderSurface());
     return fromUnManagedConsole;
 }
示例#3
0
文件: Program.cs 项目: kridy/Snaky
        public void Initialize()
        {
            IsRunnig = false;
            buffer = new Image(100, 50);
            bufferRender = AsciiGraphics.FromCharImage(buffer);
            dispRender = AsciiGraphics.FromUnManagedConsole();

            bufferRender.Clear();
        }
示例#4
0
 public static AsciiGraphics FromCharImage(Image image)
 {
     var fromCharImage = new AsciiGraphics(new ImageRenderSurface(image));
     return fromCharImage;
 }
示例#5
0
文件: Program.cs 项目: kridy/Snaky
 public void Render(LoopState state, AsciiGraphics g)
 {
     ax = /*x;//*/ (x - lastX) * state.Interpolation + lastX;
     ay = /*y;//*/ (y - lastY) * state.Interpolation + lastY;
     Debug.WriteLine("ay,ay - {0},{1}", ax, ay);
     g.DrawPoint(new AsciiPen('O', AsciiColors.Red), new Point((uint)ax, (uint)ay));
 }