Exemple #1
0
        public static PDFName PDFLineEndingStyleToPDFName(LineEndingStyle style)
        {
            switch (style)
            {
            case LineEndingStyle.Butt:
                return(new PDFName("Butt"));

            case LineEndingStyle.Circle:
                return(new PDFName("Circle"));

            case LineEndingStyle.ClosedArrow:
                return(new PDFName("ClosedArrow"));

            case LineEndingStyle.Diamond:
                return(new PDFName("Diamond"));

            case LineEndingStyle.OpenArrow:
                return(new PDFName("OpenArrow"));

            case LineEndingStyle.RClosedArrow:
                return(new PDFName("RClosedArrow"));

            case LineEndingStyle.ROpenArrow:
                return(new PDFName("ROpenArrow"));

            case LineEndingStyle.Slash:
                return(new PDFName("Slash"));

            case LineEndingStyle.Square:
                return(new PDFName("Square"));
            }

            return(new PDFName("None"));
        }
Exemple #2
0
        private void SetSupportedProperty(Annotation ann)
        {
            bool isSupp = (ann.AnnotationFeatureLevel <= 1.5);

            // check the ending styles of the Line and PolyLine (in case the line is
            // an Arrow) for the endings that DotNETViewer knows how to draw
            LineEndingStyle[] lineStyles      = new LineEndingStyle[] { properties.StartEndingStyle, properties.EndEndingStyle };
            LineEndingStyle[] supportedStyles = new LineEndingStyle[] { LineEndingStyle.None, LineEndingStyle.Circle, LineEndingStyle.OpenArrow, LineEndingStyle.ClosedArrow };

            foreach (LineEndingStyle style in lineStyles)
            {
                isSupp = isSupp && (Array.IndexOf(supportedStyles, style) != -1);
                if (!isSupp)
                {
                    break;
                }
            }
            properties.IsAnnotationSupported = isSupp;
        }
Exemple #3
0
 public EndingStyles(LineEndingStyle begin, LineEndingStyle end)
 {
     _array = new PDFArray();
     _array.AddItem(new PDFName(begin.ToString()));
     _array.AddItem(new PDFName(end.ToString()));
 }