Created
May 15, 2017 05:50
-
-
Save kencoba/40734b6c0e918395e28fb79cb549f187 to your computer and use it in GitHub Desktop.
This is for control PowerPoint with PowerShell.
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
Class Points { | |
[double] $Left | |
[double] $Top | |
[double] $Width | |
[double] $Height | |
[Points] Magnify([double] $percent) { | |
$center_X = $this.Left + ($this.Width / 2) | |
$center_Y = $this.Top + ($this.Height /2) | |
$newWidth = $this.Width * $percent | |
$newHeight = $this.Height * $percent | |
$newLeft = $this.Left + ($this.Width - $newWidth) / 2 | |
$newTop = $this.Top + ($this.Height - $newHeight) / 2 | |
return New-Object Points($newLeft, $newTop, $newWidth, $newHeight) | |
} | |
Points([double] $Left, [double] $Top, [double] $Width, [double] $Height) { | |
$this.Left = $Left | |
$this.Top = $Top | |
$this.Width = $Width | |
$this.Height = $Height | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment