mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Rename Raster's ImageData code from *Data to *ImageData, to avoid clash with future Item#data.
This commit is contained in:
parent
22218e0db0
commit
053aa15ded
1 changed files with 5 additions and 5 deletions
|
@ -417,13 +417,13 @@ var Raster = this.Raster = PlacedItem.extend(/** @lends Raster# */{
|
|||
ctx.putImageData(imageData, _point.x, _point.y);
|
||||
},
|
||||
|
||||
// DOCS: document Raster#createData
|
||||
// DOCS: document Raster#createImageData
|
||||
/**
|
||||
* {@grouptitle Image Data}
|
||||
* @param {Size} size
|
||||
* @return {ImageData}
|
||||
*/
|
||||
createData: function(size) {
|
||||
createImageData: function(size) {
|
||||
size = Size.read(arguments);
|
||||
return this.getContext().createImageData(size.width, size.height);
|
||||
},
|
||||
|
@ -434,7 +434,7 @@ var Raster = this.Raster = PlacedItem.extend(/** @lends Raster# */{
|
|||
* @param {Rectangle} rect
|
||||
* @return {ImageData}
|
||||
*/
|
||||
getData: function(rect) {
|
||||
getImageData: function(rect) {
|
||||
rect = Rectangle.read(arguments);
|
||||
if (rect.isEmpty())
|
||||
rect = new Rectangle(this.getSize());
|
||||
|
@ -442,13 +442,13 @@ var Raster = this.Raster = PlacedItem.extend(/** @lends Raster# */{
|
|||
rect.width, rect.height);
|
||||
},
|
||||
|
||||
// DOCS: document Raster#setData
|
||||
// DOCS: document Raster#setImageData
|
||||
/**
|
||||
* @param {ImageData} data
|
||||
* @param {Point} point
|
||||
* @return {ImageData}
|
||||
*/
|
||||
setData: function(data, point) {
|
||||
setImageData: function(data, point) {
|
||||
point = Point.read(arguments, 1);
|
||||
this.getContext(true).putImageData(data, point.x, point.y);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue