Visio Şeklini Görüntüye Dönüştür
Contents
[
Hide
]
visio şeklini resme dönüştürün
Bu konu, geliştiricilerin bir visio şeklini Aspose.Diagram kullanarak görüntüye nasıl dönüştürebileceğini ayrıntılı olarak açıklar. Tarafından sunulan ToImage yöntemiŞekil sınıf görüntüye dönüştürmek için kullanılabilir.
Aşağıdaki kod nasıl yapılacağını gösterir:
- Bir numune yükleyin diagram.
- belirli bir sayfa alın.
- Belirli bir şekil elde edin.
- şekli görüntüye dönüştürün.
Şekilden görüntüye Programlama Örneği
visio şeklini görüntüye dönüştürmek için .net uygulamanızda aşağıdaki kodu kullanın.
This file contains 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_Shapes(); | |
// Call a Diagram class constructor to load the VSDX diagram | |
Diagram diagram = new Diagram(dataDir + "ShapeToImage.vsdx"); | |
// Get a particular page | |
Page page = diagram.Pages[0]; | |
// Get a particular shape | |
Shape shape = page.Shapes[0]; | |
// Shape to Image | |
Aspose.Diagram.Saving.ImageSaveOptions o = new Aspose.Diagram.Saving.ImageSaveOptions(SaveFileFormat.PNG); | |
shape.ToImage("out.png", o); |