Aspose.Words.Examples.CSharp.Rendering_and_Printing.RenderShape.RenderShapeToDisk C# (CSharp) 메소드

RenderShapeToDisk() 공개 정적인 메소드

public static RenderShapeToDisk ( string dataDir, Shape shape ) : void
dataDir string
shape Shape
리턴 void
        public static void RenderShapeToDisk(string dataDir, Shape shape)
        {
            // ExStart:RenderShapeToDisk
            ShapeRenderer r = shape.GetShapeRenderer();

            // Define custom options which control how the image is rendered. Render the shape to the JPEG raster format.
            ImageSaveOptions imageOptions = new ImageSaveOptions(SaveFormat.Emf)
            {
                Scale = 1.5f
            };

            dataDir = dataDir + "TestFile.RenderToDisk_out.emf";
            // Save the rendered image to disk.
            r.Save(dataDir, imageOptions);
            // ExEnd:RenderShapeToDisk
            Console.WriteLine("\nShape rendered to disk successfully.\nFile saved at " + dataDir);
        }
        public static void RenderShapeToStream(string dataDir, Shape shape)