Example #1
0
        internal override Annotation Clone(IDocumentEssential owner, Page page)
        {
            if (Page == null)
            {
                ApplyOwner(owner);
                SetPage(page, true);

                float l = Left;
                float t = Top;
                float w = Width;
                float h = Height;
                float a = RotationAngle;

                Rectangle        = null;
                Rectangle.Left   = l;
                Rectangle.Top    = t;
                Rectangle.Width  = w;
                Rectangle.Height = h;
                Rectangle.Angle  = a;

                return(this);
            }

            PDFDictionary res = AnnotationBase.Copy(Dictionary);

            MarkupAnnotationBase.CopyTo(Dictionary, res);
            TextMarkupAnnotation.CopyTo(Dictionary, res, Page, page);

            HighlightAnnotation annot = new HighlightAnnotation(res, owner);

            annot.SetPage(page, true);
            return(annot);
        }