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)); }
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()); }
public virtual void SetAndGetBorderEffectTest() { PdfPolyGeomAnnotation pdfPolyGeomAnnotation = new PdfPolygonAnnotation(new PdfDictionary()); PdfDictionary dict = new PdfDictionary(); pdfPolyGeomAnnotation.SetBorderEffect(dict); NUnit.Framework.Assert.AreEqual(dict, pdfPolyGeomAnnotation.GetBorderEffect()); }
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)); }
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()); }
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()); }
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()); }
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()); }
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()); }
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()); }