Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the Bytescout.PDF.InkAnnotation class.
        /// </summary>
        /// <param name="inkList">The Bytescout.PDF.InkList representing a stroked path.</param>
        public InkAnnotation(InkList inkList)
            : base(null)
        {
            if (inkList == null)
            {
                throw new ArgumentNullException();
            }

            if (inkList.Page != null)
            {
                _inkList = new InkList();
                for (int i = 0; i < inkList.Count; ++i)
                {
                    _inkList.AddArray(new PointsArray(inkList[i].ToArray()));
                }
            }
            else
            {
                _inkList = inkList;
            }
            _inkList.ChangedInkList += changedInkList;

            Dictionary.AddItem("Subtype", new PDFName("Ink"));
            Dictionary.AddItem("InkList", _inkList.Array);
            _borderStyle = new AnnotationBorderStyle();
            Dictionary.AddItem("BS", _borderStyle.GetDictionary());
            Color = new ColorRGB(0, 0, 0);
        }
Esempio n. 2
0
        private void loadBorderStyle()
        {
            PDFDictionary bs = Dictionary["BS"] as PDFDictionary;

            if (bs != null)
            {
                _borderStyle = new AnnotationBorderStyle(bs);
            }
            else
            {
                _borderStyle = new AnnotationBorderStyle();
                Dictionary.AddItem("BS", _borderStyle.GetDictionary());
            }
        }
Esempio n. 3
0
        private void loadBorderStyle()
        {
            PDFDictionary dict = Dictionary["BS"] as PDFDictionary;

            if (dict == null)
            {
                _borderStyle = new AnnotationBorderStyle();
                Dictionary.AddItem("BS", _borderStyle.GetDictionary());
            }
            else
            {
                _borderStyle = new AnnotationBorderStyle(dict);
            }
            _borderStyle.ChangedBorderStyle += changedBorderStyle;
        }
Esempio n. 4
0
        private void loadBorderStyle()
        {
            PDFDictionary bs = Dictionary["BS"] as PDFDictionary;

            if (bs != null)
            {
                _borderStyle = new AnnotationBorderStyle(bs);
            }
            else
            {
                _borderStyle = new AnnotationBorderStyle();
                Dictionary.AddItem("BS", _borderStyle.GetDictionary());
            }
            _borderStyle.ChangedBorderStyle += new ChangedBorderStyleEventHandler(changedBorderStyle);
        }