コード例 #1
0
        public void DrawEllipse()
        {
            var doc = new PortableDocument();

            doc.AddPage(200, 100);
            doc.SetColor(OxyColors.Orange);
            doc.SetFillColor(OxyColors.LightGreen);
            doc.DrawEllipse(5, 5, 190, 90, true);
            doc.DrawEllipse(175, 85, 20, 10);
            doc.Save(Folder + "DrawEllipse.pdf");
        }
コード例 #2
0
        public void DrawText_TopLeftCoordinateSystem()
        {
            var doc = new PortableDocument();
            doc.AddPage(PageSize.A4);
            doc.Transform(1, 0, 0, -1, 0, doc.PageHeight);
            doc.SetHorizontalTextScaling(-100);

            // Note: negative font size
            doc.SetFont("Arial", -20);
            doc.DrawText(5, 25, "Hello world!");

            doc.SetColor(OxyColors.Blue);
            doc.DrawCross(5, 25);

            doc.SetColor(OxyColors.Blue);
            doc.SetFillColor(OxyColors.LightBlue);
            doc.DrawEllipse(50, 100, 50, 40, true);

            doc.Save(Folder + "DrawText_TopLeftCoordinateSystem.pdf");
        }
コード例 #3
0
        public void DrawText_TopLeftCoordinateSystem()
        {
            var doc = new PortableDocument();

            doc.AddPage(PageSize.A4);
            doc.Transform(1, 0, 0, -1, 0, doc.PageHeight);
            doc.SetHorizontalTextScaling(-100);

            // Note: negative font size
            doc.SetFont("Arial", -20);
            doc.DrawText(5, 25, "Hello world!");

            doc.SetColor(OxyColors.Blue);
            doc.DrawCross(5, 25);

            doc.SetColor(OxyColors.Blue);
            doc.SetFillColor(OxyColors.LightBlue);
            doc.DrawEllipse(50, 100, 50, 40, true);

            doc.Save(Folder + "DrawText_TopLeftCoordinateSystem.pdf");
        }
コード例 #4
0
 public void DrawEllipse()
 {
     var doc = new PortableDocument();
     doc.AddPage(200, 100);
     doc.SetColor(OxyColors.Orange);
     doc.SetFillColor(OxyColors.LightGreen);
     doc.DrawEllipse(5, 5, 190, 90, true);
     doc.DrawEllipse(175, 85, 20, 10);
     doc.Save(Folder + "DrawEllipse.pdf");
 }