mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Floor drawFillRect values
This commit is contained in:
parent
b108cd03f0
commit
bf4c475e85
1 changed files with 9 additions and 2 deletions
|
@ -1016,7 +1016,11 @@ var TextureTintPipeline = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pushes a filled rectangle into the vertex batch.
|
* Pushes a filled rectangle into the vertex batch.
|
||||||
|
*
|
||||||
|
* The dimensions are run through `Math.floor` before the quad is generated.
|
||||||
|
*
|
||||||
* Rectangle has no transform values and isn't transformed into the local space.
|
* Rectangle has no transform values and isn't transformed into the local space.
|
||||||
|
*
|
||||||
* Used for directly batching untransformed rectangles, such as Camera background colors.
|
* Used for directly batching untransformed rectangles, such as Camera background colors.
|
||||||
*
|
*
|
||||||
* @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect
|
* @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect
|
||||||
|
@ -1031,8 +1035,11 @@ var TextureTintPipeline = new Class({
|
||||||
*/
|
*/
|
||||||
drawFillRect: function (x, y, width, height, color, alpha)
|
drawFillRect: function (x, y, width, height, color, alpha)
|
||||||
{
|
{
|
||||||
var xw = x + width;
|
x = Math.floor(x);
|
||||||
var yh = y + height;
|
y = Math.floor(y);
|
||||||
|
|
||||||
|
var xw = Math.floor(x + width);
|
||||||
|
var yh = Math.floor(y + height);
|
||||||
|
|
||||||
var blank = this.renderer.blankTexture.glTexture;
|
var blank = this.renderer.blankTexture.glTexture;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue