Sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.
Наследование: IDrawable
Пример #1
0
    public void Test_Constructor_Rectangle()
    {
      var rectangle = new Rectangle(1, 2, 3, 4);

      var viewbox = new DrawableViewbox(rectangle);
      Assert.AreEqual(1, viewbox.UpperLeftX);
      Assert.AreEqual(2, viewbox.UpperLeftY);
      Assert.AreEqual(4, viewbox.LowerRightX);
      Assert.AreEqual(6, viewbox.LowerRightY);

      viewbox = (DrawableViewbox)rectangle;
      Assert.AreEqual(1, viewbox.UpperLeftX);
      Assert.AreEqual(2, viewbox.UpperLeftY);
      Assert.AreEqual(4, viewbox.LowerRightX);
      Assert.AreEqual(6, viewbox.LowerRightY);
    }