Created
September 10, 2024 11:23
-
-
Save fileformat-slides-gists/98e41746790148ae2502aecbd8500d2f to your computer and use it in GitHub Desktop.
How to Draw Rectangle in PowerPoint PPT PPTX Slides | FileFormat.Slides
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
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\draw.pptx"); | |
// Create slide | |
Slide slide = new Slide(); | |
// Create Rectangle object and set it's properties | |
Rectangle rectangle = new Rectangle(); | |
rectangle.Width = 500.0; | |
rectangle.Height =300.0; | |
rectangle.X = rectangle.Width / 2; | |
rectangle.Y = rectangle.Height / 2; | |
rectangle.BackgroundColor = "5f7200"; | |
slide.DrawRectangle(triangle); | |
// Append slide into presentation | |
presentation.AppendSlide(slide); | |
// Save presentation | |
presentation.Save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment