ارسم الماس
ارسم الماس في Visio
Aspose.Diagram for .NET API يسمح للمطورين برسم شكل ماسي في الصفحة. يوضح مثال الكود أدناه كيفية رسم ماسة في رسم Visio.
// 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, 2), new PointF(2, 0), new PointF(3, 2), new PointF(2, 4), new PointF(1, 2) }; | |
//Draw Diamond in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawDiamondInPage_out.vsdx", SaveFileFormat.VSDX); |
ارسم الماس في SVG
Aspose.Diagram for .NET API يسمح للمطورين برسم ماسة في الصفحة وحفظها بتنسيق SVG. يوضح مثال الكود أدناه كيفية رسم ماسة برسم Visio وحفظها بتنسيق SVG.
// 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, 2), new PointF(2, 0), new PointF(3, 2), new PointF(2, 4), new PointF(1, 2) }; | |
//Draw Diamond 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 + "DrawDiamondInPage_out.svg", imageSaveOptions); |
ارسم الماس في PDF
Aspose.Diagram for .NET API يسمح للمطورين برسم ماسة في الصفحة وحفظها بتنسيق PDF. يوضح مثال الكود أدناه كيفية رسم ماسة برسم Visio وحفظها بتنسيق PDF.
// 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, 2), new PointF(2, 0), new PointF(3, 2), new PointF(2, 4), new PointF(1, 2) }; | |
//Draw Diamond in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawDiamondInPage_out.pdf", new PdfSaveOptions()); |
ارسم الماس في PNG
Aspose.Diagram for .NET API يسمح للمطورين برسم ماسة في الصفحة وحفظها بتنسيق PNG. يوضح مثال الكود أدناه كيفية رسم ماسة برسم Visio وحفظها بتنسيق PNG.
// 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, 2), new PointF(2, 0), new PointF(3, 2), new PointF(2, 4), new PointF(1, 2) }; | |
//Draw Diamond 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 + "DrawDiamondInPage_out.png", imageSaveOptions); |
ارسم الماس في HTML
Aspose.Diagram for .NET API يسمح للمطورين برسم ماسة في الصفحة وحفظها بتنسيق HTML. يوضح مثال الكود أدناه كيفية رسم ماسة برسم Visio وحفظها بتنسيق HTML.
// 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, 2), new PointF(2, 0), new PointF(3, 2), new PointF(2, 4), new PointF(1, 2) }; | |
//Draw Diamond in page | |
diagram.Pages[0].DrawPolyline(1, 1, 2, 2, ps); | |
// Save diagram | |
diagram.Save(dataDir + "DrawDiamondInPage_out.html", new HTMLSaveOptions()); |