Exemplo n.º 1
0
 public Square(ScalingCanvas canvas, int x, int y, int length)
     : base(canvas)
 {
     this.x      = x;
     this.y      = y;
     this.length = length;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            WriteExpectedValues();

            // create two canvases with different scale factors
            ScalingCanvas canvas1 = new ScalingCanvas(2);
            ScalingCanvas canvas2 = new ScalingCanvas(4);

            // create a couple of squares on each canvas
            Square square1 = new Square(canvas1, 10, 10, 10);
            Square square2 = new Square(canvas2, 5, 5, 5);

            // 'draw' them
            square1.Draw();
            square2.Draw();

            Console.ReadKey();
        }
Exemplo n.º 3
0
 protected DrawingObjectBase(ScalingCanvas canvas)
 {
     this.Canvas = canvas;
 }