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

            pdfPolyGeomAnnotation.SetBorderStyle(PdfName.D);
            NUnit.Framework.Assert.AreEqual(PdfName.D, pdfPolyGeomAnnotation.GetBorderStyle().GetAsName(PdfName.S));
        }
Exemple #2
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());
        }
Exemple #3
0
        public virtual void SetAndGetBorderEffectTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());
            PdfDictionary         dict = new PdfDictionary();

            pdfPolyGeomAnnotation.SetBorderEffect(dict);
            NUnit.Framework.Assert.AreEqual(dict, pdfPolyGeomAnnotation.GetBorderEffect());
        }
Exemple #4
0
        public virtual void SetAndGetDashPatternTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());
            PdfArray array = new PdfArray(new float[] { 1, 2 });

            pdfPolyGeomAnnotation.SetDashPattern(array);
            NUnit.Framework.Assert.AreEqual(array, pdfPolyGeomAnnotation.GetBorderStyle().GetAsArray(PdfName.D));
        }
Exemple #5
0
        public virtual void SetAndGetBorderStylePdfDictTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());
            PdfDictionary         style = new PdfDictionary();

            style.Put(PdfName.Width, new PdfNumber(1));
            pdfPolyGeomAnnotation.SetBorderStyle(style);
            NUnit.Framework.Assert.AreEqual(style, pdfPolyGeomAnnotation.GetBorderStyle());
        }
Exemple #6
0
        public virtual void SetAndGetInteriorColorFloatArrayTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());

            float[] colorValues = new float[] { 0.0f, 0.5f, 0.1f };
            pdfPolyGeomAnnotation.SetInteriorColor(colorValues);
            Color expectedColor = Color.MakeColor(PdfColorSpace.MakeColorSpace(PdfName.DeviceRGB), colorValues);

            NUnit.Framework.Assert.AreEqual(expectedColor, pdfPolyGeomAnnotation.GetInteriorColor());
        }
Exemple #7
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());
        }
Exemple #8
0
        public virtual void SetAndGetPathTest()
        {
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary());
            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.ToString(), pdfPolyGeomAnnotation.GetPath().ToString());
        }
Exemple #9
0
        public virtual void SetAndGetMeasureTest()
        {
            PdfDictionary dict = new PdfDictionary();

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

            measure.Put(PdfName.Subtype, new PdfString(""));
            pdfPolyGeomAnnotation.SetMeasure(measure);
            NUnit.Framework.Assert.AreEqual(measure, pdfPolyGeomAnnotation.GetMeasure());
        }
Exemple #10
0
        public virtual void SetAndGetLineEndingStylesTest()
        {
            PdfDictionary dict = new PdfDictionary();

            dict.Put(PdfName.Path, new PdfString(""));
            PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(dict);
            PdfArray lineEndingStyles = new PdfArray(new float[] { 1, 2 });

            pdfPolyGeomAnnotation.SetLineEndingStyles(lineEndingStyles);
            NUnit.Framework.Assert.AreEqual(lineEndingStyles.ToFloatArray(), pdfPolyGeomAnnotation.GetLineEndingStyles
                                                ().ToFloatArray());
        }