예제 #1
0
        private static void AddBorderStyleAlt(BorderStyleAltObject borderStyleAltObject, XmlElement annot, XmlDocument
                                              document)
        {
            //BorderStyle alt contains Border style encoded in the format specified in the border style attributes as content
            //has attributes
            XmlElement borderStyleAlt = document.CreateElement(XfdfConstants.BORDER_STYLE_ALT);

            //required attributes
            borderStyleAlt.SetAttribute(XfdfConstants.H_CORNER_RADIUS, XfdfObjectUtils.ConvertFloatToString(borderStyleAltObject
                                                                                                            .GetHCornerRadius()));
            borderStyleAlt.SetAttribute(XfdfConstants.V_CORNER_RADIUS, XfdfObjectUtils.ConvertFloatToString(borderStyleAltObject
                                                                                                            .GetVCornerRadius()));
            borderStyleAlt.SetAttribute(XfdfConstants.WIDTH_CAPITAL, XfdfObjectUtils.ConvertFloatToString(borderStyleAltObject
                                                                                                          .GetWidth()));
            //optional attribute
            if (borderStyleAltObject.GetDashPattern() != null)
            {
                //TODO add real conversion from PdfArray (PdfName.D in Border dictionary) to String
                borderStyleAlt.SetAttribute(XfdfConstants.DASH_PATTERN, JavaUtil.ArraysToString(borderStyleAltObject.GetDashPattern
                                                                                                    ()));
            }
            if (borderStyleAltObject.GetContent() != null)
            {
                borderStyleAlt.InnerText = borderStyleAltObject.GetContent();
            }
            annot.AppendChild(borderStyleAlt);
        }
예제 #2
0
 /// <summary>Sets the BorderStyleAlt element, a child of the link element.</summary>
 /// <remarks>
 /// Sets the BorderStyleAlt element, a child of the link element.
 /// Corresponds to the Border key in the common annotation dictionary.
 /// </remarks>
 public virtual iText.Forms.Xfdf.AnnotObject SetBorderStyleAlt(BorderStyleAltObject borderStyleAlt)
 {
     this.borderStyleAlt = borderStyleAlt;
     return(this);
 }