Ejemplo n.º 1
0
 private void ColorPicker1_SetColor(Color c)
 {
     inkControl1.Brush = PBrush.CreateSolid(c);
     if (inkControl1.Page.GetSelectedLines().Count() > 0)
     {
         inkControl1.Page.SetSelectionBrush(inkControl1.Brush);
         inkControl1.RefreshPage();
     }
 }
Ejemplo n.º 2
0
        public void OnShow(InkControl control)
        {
            if (OriginalPage != null && BackgroundImage == null)
            {
                string      path = TmpManager.GetTmpDir() + "\\render.pdf";
                PdfDocument doc  = new PdfDocument();
                doc.Pages.Add(OriginalPage);
                doc.Save(path);
                Bitmap[] bmp = MupdfSharp.PageRenderer.Render(path, 50, 0);
                BackgroundImage = new Renderer.Image(bmp[0]);

                loaderThread = new Thread(delegate()
                {
                    Bitmap[] bmp2 = MupdfSharp.PageRenderer.Render(path, PDFImporter.PAGETHEIGHTPIXEL, 0);
                    BackgroundImage.Dispose();
                    BackgroundImage = new Renderer.Image(bmp2[0]);
                    control.RefreshPage();
                });
                loaderThread.Start();
            }
        }