Exemplo n.º 1
0
            public void Stop(bool bFinal)
            {
                if (doc != null)
                {
                    doc.UnregisterPagesViewDrawCallback(PDFXEdit.PXV_PagesViewDrawStage.PXV_PagesViewDraw_Foreground, this);
                    doc = null;
                }

                if (bFinal)
                {
                    quads = null;
                    poly  = null;
                    brush = null;
                    pen   = null;
                }
            }
Exemplo n.º 2
0
            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);
            }