internal static void CopyTo(PDFDictionary sourceDict, PDFDictionary destinationDict) { string[] keys = { "H", "FT", "T", "TU", "TM", "Ff", "V", "DV" }; for (int i = 0; i < keys.Length; ++i) { IPDFObject obj = sourceDict[keys[i]]; if (obj != null) { destinationDict.AddItem(keys[i], obj.Clone()); } } PDFDictionary bs = sourceDict["BS"] as PDFDictionary; if (bs != null) { destinationDict.AddItem("BS", AnnotationBorderStyle.Copy(bs)); } PDFDictionary mk = sourceDict["MK"] as PDFDictionary; if (mk != null) { destinationDict.AddItem("MK", AppearanceCharacteristics.Copy(mk)); } }
internal override Annotation Clone(IDocumentEssential owner, Page page) { if (Page == null) { ApplyOwner(owner); SetPage(page, true); return(this); } PDFDictionary res = AnnotationBase.Copy(Dictionary); IPDFObject t = Dictionary["T"]; if (t != null) { res.AddItem("T", t.Clone()); } PDFDictionary mk = Dictionary["MK"] as PDFDictionary; if (mk != null) { res.AddItem("MK", AppearanceCharacteristics.Copy(mk)); } ScreenAnnotation annot = new ScreenAnnotation(res, owner); annot.SetPage(Page, false); annot.SetPage(page, true); annot.OnActivated = OnActivated; annot.OnMouseDown = OnMouseDown; annot.OnMouseEnter = OnMouseEnter; annot.OnMouseExit = OnMouseExit; annot.OnMouseUp = OnMouseUp; annot.OnPageClose = OnPageClose; annot.OnPageInvisible = OnPageInvisible; annot.OnPageOpen = OnPageOpen; annot.OnPageVisible = OnPageVisible; return(annot); }