@@ -623,6 +623,8 @@ Phaser.BitmapData.prototype = {
623623
624624 /**
625625 * Get the color of a specific pixel in the context into a color object.
626+ * If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
627+ * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
626628 *
627629 * @method Phaser.BitmapData#getPixel
628630 * @param {number } x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.
@@ -655,6 +657,8 @@ Phaser.BitmapData.prototype = {
655657
656658 /**
657659 * Get the color of a specific pixel including its alpha value.
660+ * If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
661+ * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
658662 * Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.
659663 *
660664 * @method Phaser.BitmapData#getPixel32
@@ -673,6 +677,8 @@ Phaser.BitmapData.prototype = {
673677
674678 /**
675679 * Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.
680+ * If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
681+ * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
676682 *
677683 * @method Phaser.BitmapData#getPixelRGB
678684 * @param {number } x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.
0 commit comments