MCPcopy Index your code
hub / github.com/bqplot/bqplot / getPixel

Method getPixel

js/src/Figure.ts:1434–1444  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

1432 }
1433
1434 async getPixel(x, y) {
1435 const canvas = await this.get_rendered_canvas(window.devicePixelRatio);
1436 const context = canvas.getContext('2d');
1437 const pixel = context.getImageData(
1438 x * window.devicePixelRatio,
1439 y * window.devicePixelRatio,
1440 1,
1441 1
1442 );
1443 return pixel.data;
1444 }
1445
1446 change_theme() {
1447 this.el.classList.remove(this.model.previous('theme'));

Callers 1

interacts.tsFile · 0.80

Calls 1

get_rendered_canvasMethod · 0.95

Tested by

no test coverage detected