ارسم البنتاغون
Contents
[
Hide
]
ارسم البنتاغون في Visio
Aspose.Diagram for .NET API يسمح للمطورين برسم شكل خماسي في صفحة يوضح مثال الكود أدناه كيفية رسم خماسي في رسم Visio.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Load diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
//Initiazlie a new PointF[] | |
PointF[] ps = new PointF[] { new PointF(1, 1), new PointF(2, 1), new PointF(2.309f, 1.951f), new PointF(1.5f, 2.54f), new PointF(0.691f, 1.951f), new PointF(1, 1) }; | |
//Draw Pentagon in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawPentagonInPage_out.vsdx", SaveFileFormat.VSDX); |
ارسم البنتاغون في SVG
Aspose.Diagram for .NET API يسمح للمطورين برسم خماسي في الصفحة وحفظه بتنسيق SVG. يوضح مثال الكود أدناه كيفية رسم خماسي في رسم Visio وحفظه بتنسيق SVG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Load diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
//Initiazlie a new PointF[] | |
PointF[] ps = new PointF[] { new PointF(1, 1), new PointF(2, 1), new PointF(2.309f, 1.951f), new PointF(1.5f, 2.54f), new PointF(0.691f, 1.951f), new PointF(1, 1) }; | |
//Draw Pentagon in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram as SVG images | |
SVGSaveOptions imageSaveOptions = new SVGSaveOptions(); | |
imageSaveOptions.PageIndex = 0; | |
diagram.Save(dataDir + "DrawPentagonInPage_out.svg", imageSaveOptions); |
ارسم البنتاغون في PDF
Aspose.Diagram for .NET API يسمح للمطورين برسم خماسي في الصفحة وحفظه بتنسيق PDF. يوضح مثال الكود أدناه كيفية رسم خماسي في رسم Visio وحفظه بتنسيق PDF.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Load diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
//Initiazlie a new PointF[] | |
PointF[] ps = new PointF[] { new PointF(1, 1), new PointF(2, 1), new PointF(2.309f, 1.951f), new PointF(1.5f, 2.54f), new PointF(0.691f, 1.951f), new PointF(1, 1) }; | |
//Draw Pentagon in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawPentagonInPage_out.pdf", new PdfSaveOptions()); |
ارسم البنتاغون في PNG
Aspose.Diagram for .NET API يسمح للمطورين برسم خماسي في الصفحة وحفظه بتنسيق PNG. يوضح مثال الكود أدناه كيفية رسم خماسي في رسم Visio وحفظه بتنسيق PNG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Load diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
//Initiazlie a new PointF[] | |
PointF[] ps = new PointF[] { new PointF(1, 1), new PointF(2, 1), new PointF(2.309f, 1.951f), new PointF(1.5f, 2.54f), new PointF(0.691f, 1.951f), new PointF(1, 1) }; | |
//Draw Pentagon in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram as PNG image | |
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFileFormat.PNG); | |
imageSaveOptions.PageIndex = 0; | |
diagram.Save(dataDir + "DrawPentagonInPage_out.png", imageSaveOptions); |
ارسم البنتاغون في HTML
Aspose.Diagram for .NET API يسمح للمطورين برسم خماسي في الصفحة وحفظه بتنسيق HTML. يوضح مثال الكود أدناه كيفية رسم خماسي في رسم Visio وحفظه بتنسيق HTML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioPages(); | |
// Load diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
//Initiazlie a new PointF[] | |
PointF[] ps = new PointF[] { new PointF(1, 1), new PointF(2, 1), new PointF(2.309f, 1.951f), new PointF(1.5f, 2.54f), new PointF(0.691f, 1.951f), new PointF(1, 1) }; | |
//Draw Pentagon in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawPentagonInPage_out.html", new HTMLSaveOptions()); |