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.
This commit is contained in:
Milkey Mouse 2015-12-10 20:40:50 -08:00
parent 83948f5882
commit df48e37658
2 changed files with 9 additions and 9 deletions

View file

@ -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 * @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. * @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; 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 * @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. * @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. * 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 * @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. * @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. * 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 * @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. * @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. * Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.

View file

@ -247,13 +247,13 @@ declare module Phaser {
circle(x: number, y: number, radius: number, fillStyle?: string): Phaser.BitmapData; circle(x: number, y: number, radius: number, fillStyle?: string): Phaser.BitmapData;
clear(x?: number, y?: number, width?: number, height?: number): Phaser.BitmapData; clear(x?: number, y?: number, width?: number, height?: number): Phaser.BitmapData;
cls(): 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; 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; destroy(): void;
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;
drawFull(parent: any, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; drawFull(parent: any, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
drawGroup(group: Phaser.Group, blendMode?: number, 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; 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; fill(r: number, g: number, b: number, a?: number): Phaser.BitmapData;
generateTexture(key: string): PIXI.Texture; generateTexture(key: string): PIXI.Texture;