public Form1() { InitializeComponent(); dha.nSize = System.Runtime.InteropServices.Marshal.SizeOf(dha); dha.nRoundRadius = 2; PDFXEdit.IUIX_Inst uiInst = (PDFXEdit.IUIX_Inst)pdfCtl.Inst.GetExtension("UIX"); brush = uiInst.CreateNewBrush(); pen = uiInst.CreateNewPen(); brush.Color0 = (uint)ColorTranslator.ToWin32(Color.Blue) | 0xFF000000; brush.Opacity = 0.3; brush.BlendType = PDFXEdit.UIX_BlendType.UIX_BlendType_Multiply; pen.Brush.Color0 = brush.Color0; pen.Brush.Opacity = 0.9; pen.Brush.BlendType = PDFXEdit.UIX_BlendType.UIX_BlendType_Multiply; PDFXEdit.IAUX_Inst auxInst = (PDFXEdit.IAUX_Inst)pdfCtl.Inst.GetExtension("AUX"); mh = auxInst.MathHelper; dhp = new DrawHighlightOnPagesCallback(); dhp.brush = brush; dhp.pen = pen; dhp.mh = mh; }
public void Start(PDFXEdit.IPXV_Inst inst, PDFXEdit.IPXV_Document doc_) { Stop(false); doc = doc_; if (quads == null) { PDFXEdit.IPXC_Inst pxcInst = (PDFXEdit.IPXC_Inst)inst.GetExtension("PXC"); quads = pxcInst.CreateQuads(); } if (poly == null) { PDFXEdit.IUIX_Inst uiInst = (PDFXEdit.IUIX_Inst)inst.GetExtension("UIX"); poly = uiInst.CreatePolyPolygonSrc(); } doc.RegisterPagesViewDrawCallback(PDFXEdit.PXV_PagesViewDrawStage.PXV_PagesViewDraw_Foreground, this, 0); }