Ejemplo n.º 1
0
        public void TestFillRect()
        {
            graphics.fillRect(10, 10, 20, 20);
            HSSFSimpleShape s = (HSSFSimpleShape)escherGroup.GetChildren()[0];

            Assert.AreEqual(HSSFSimpleShape.OBJECT_TYPE_RECTANGLE, s.GetShapeType());
            Assert.AreEqual(10, s.GetAnchor().GetDx1());
            Assert.AreEqual(10, s.GetAnchor().GetDy1());
            Assert.AreEqual(30, s.GetAnchor().GetDy2());
            Assert.AreEqual(30, s.GetAnchor().GetDx2());
        }
Ejemplo n.º 2
0
        public void TestDraw()
        {
            graphics.draw(new Line2D.Double(10, 10, 20, 20));
            HSSFSimpleShape s = (HSSFSimpleShape)escherGroup.GetChildren()[0];

            Assert.IsTrue(s.GetShapeType() == HSSFSimpleShape.OBJECT_TYPE_LINE);
            Assert.AreEqual(10, s.GetAnchor().GetDx1());
            Assert.AreEqual(10, s.GetAnchor().GetDy1());
            Assert.AreEqual(20, s.GetAnchor().GetDx2());
            Assert.AreEqual(20, s.GetAnchor().GetDy2());
            System.Console.WriteLine("s = " + s);
        }