From fd1e25151a335a8e942f870038ae1e58b41a60cc Mon Sep 17 00:00:00 2001 From: MuTsunTsai <39870664+MuTsunTsai@users.noreply.github.com> Date: Wed, 30 Jan 2019 10:27:33 +0800 Subject: [PATCH] Add Size.set methods --- types/paper/index.d.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index 08a6d794ad..409366488f 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -1109,6 +1109,37 @@ declare module paper { modulo(size: number[]): Size; modulo(size: number): Size; + /** + * Sets the size with the given width and height values. + * @param width - the width + * @param height - the height + */ + set(width: number, height: number): Size; + + /** + * Sets the size using the numbers in the given array as dimensions. + * @param array - an array of numbers + */ + set(array: number[]): Size; + + /** + * Sets the size using the properties in the given object. + * @param object - the object literal containing properies (width:10, height:10 etc) + */ + set(object: any): Size; + + /** + * Sets the size using the coordinates of the given Size object. + * @param size - the size to duplicate from + */ + set(size: Size): Size; + + /** + * Sets the size using the point.x and point.y values of the given Point object. + * @param point - the point from which to create a size + */ + set(point: Point): Size; + } export interface IFrameEvent {