Example #1
0
        public virtual void SetAndGetVerticesFloatArrayTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());

            float[] vertices = new float[] { 1, 1, 1, 1 };
            pdfPolyGeomAnnotation.SetVertices(vertices);
            NUnit.Framework.Assert.AreEqual(vertices, pdfPolyGeomAnnotation.GetVertices().ToFloatArray());
        }
Example #2
0
        public virtual void SetAndGetVerticesFloatArrayLogMessageTest()
        {
            PdfDictionary dict = new PdfDictionary();

            dict.Put(PdfName.Path, new PdfString(""));
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(dict);

            float[] vertices = new float[] { 1, 1, 1, 1 };
            pdfPolyGeomAnnotation.SetVertices(vertices);
            NUnit.Framework.Assert.AreEqual(vertices, pdfPolyGeomAnnotation.GetVertices().ToFloatArray());
        }
Example #3
0
        public virtual void SetAndGetPathLogMessageTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());

            pdfPolyGeomAnnotation.SetVertices(new float[] { 1, 1, 1, 1 });
            IList <PdfObject> arrays = new List <PdfObject>();

            arrays.Add(new PdfArray(new float[] { 10, 10 }));
            PdfArray path = new PdfArray(arrays);

            pdfPolyGeomAnnotation.SetPath(path);
            NUnit.Framework.Assert.AreEqual(path, pdfPolyGeomAnnotation.GetPath());
        }