Ejemplo n.º 1
0
        public virtual void CreateBoundingRectangleFromQuadPointsTest02()
        {
            float[]  points     = new float[] { 0, 0, 2, 1, 1, 2, -2, 1, 0 };
            PdfArray quadpoints = new PdfArray(points);
            bool     exception  = false;

            try {
                Rectangle.CreateBoundingRectangleFromQuadPoint(quadpoints);
            }
            catch (PdfException) {
                exception = true;
            }
            NUnit.Framework.Assert.IsTrue(exception);
        }
Ejemplo n.º 2
0
        public virtual void CreateBoundingRectangleFromQuadPointsTest01()
        {
            Rectangle actual;
            Rectangle expected;

            float[]  points     = new float[] { 0, 0, 2, 1, 1, 2, -2, 1 };
            PdfArray quadpoints = new PdfArray(points);

            expected = new Rectangle(-2, 0, 4, 2);
            actual   = Rectangle.CreateBoundingRectangleFromQuadPoint(quadpoints);
            bool?areEqual = expected.EqualsWithEpsilon(actual);

            NUnit.Framework.Assert.IsTrue(areEqual);
        }