From df48e376582f3c0e5bc9e682c26b837159301b2a Mon Sep 17 00:00:00 2001 From: Milkey Mouse Date: Thu, 10 Dec 2015 20:40:50 -0800 Subject: [PATCH] Fix issue #2188: blendMode type from number to string This fixes a minor TS definitions bug (issue #2188) where the blendMode of BitmapData.copy, .copyRect, .draw, and .drawGroup all had the number type instead of string. --- typescript/phaser.comments.d.ts | 8 ++++---- typescript/phaser.d.ts | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/typescript/phaser.comments.d.ts b/typescript/phaser.comments.d.ts index 2a90b88a3..61fd4e84a 100644 --- a/typescript/phaser.comments.d.ts +++ b/typescript/phaser.comments.d.ts @@ -1193,7 +1193,7 @@ declare module Phaser { * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false * @return This BitmapData object for method chaining. */ - copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; copyPixels(source: any, area: Phaser.Rectangle, x: number, y: number, alpha?: number): void; /** @@ -1208,7 +1208,7 @@ declare module Phaser { * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false * @return This BitmapData object for method chaining. */ - copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; /** * Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified. @@ -1224,7 +1224,7 @@ declare module Phaser { * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false * @return This BitmapData object for method chaining. */ - draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; /** * Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children. @@ -1254,7 +1254,7 @@ declare module Phaser { * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false * @return This BitmapData object for method chaining. */ - drawGroup(group: Phaser.Group, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + drawGroup(group: Phaser.Group, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; /** * Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData. diff --git a/typescript/phaser.d.ts b/typescript/phaser.d.ts index a0f46fff4..3fa682895 100644 --- a/typescript/phaser.d.ts +++ b/typescript/phaser.d.ts @@ -247,13 +247,13 @@ declare module Phaser { circle(x: number, y: number, radius: number, fillStyle?: string): Phaser.BitmapData; clear(x?: number, y?: number, width?: number, height?: number): Phaser.BitmapData; cls(): Phaser.BitmapData; - copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; copyPixels(source: any, area: Phaser.Rectangle, x: number, y: number, alpha?: number): void; - copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; destroy(): void; - draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; - drawFull(parent: any, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; - drawGroup(group: Phaser.Group, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; + draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; + drawFull(parent: any, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; + drawGroup(group: Phaser.Group, blendMode?: string, roundPx?: boolean): Phaser.BitmapData; extract(destination: Phaser.BitmapData, r: number, g: number, b: number, a?: number, resize?: boolean, r2?: number, g2?: number, b2?: number): Phaser.BitmapData; fill(r: number, g: number, b: number, a?: number): Phaser.BitmapData; generateTexture(key: string): PIXI.Texture;