Beispiel #1
0
// The CanvasRenderingContext2D.getImageData() method of the Canvas 2D API returns an ImageData object
// representing the underlying pixel data for the area of the canvas
// denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.
// x The x coordinate of the upper left corner of the rectangle from which the ImageData will be extracted.
// y The y coordinate of the upper left corner of the rectangle from which the ImageData will be extracted.
// width The width of the rectangle from which the ImageData will be extracted.
// height The height of the rectangle from which the ImageData will be extracted.
func getImageData(ctx *dom.CanvasRenderingContext2D, x, y, width, heigth int) *imageData {
	o := ctx.Call("getImageData", x, y, width, heigth)
	return &imageData{Object: o}
}