Skip to content

Class: ImageLayer ​

Defined in: layers/image.ts:64

An RGBA image (Bokeh image_rgba / image_url) drawn as a textured quad over a data-space extent — reuses the heatmap quad path. A string source is loaded asynchronously; pass onLoad (→ plot.requestRender) so the plot redraws once the pixels arrive.

Implements ​

Constructors ​

Constructor ​

ts
new ImageLayer(gl, opts): ImageLayer;

Defined in: layers/image.ts:83

Parameters ​

ParameterType
glWebGL2RenderingContext
optsImageOptions

Returns ​

ImageLayer

Properties ​

colorCss ​

ts
readonly colorCss: "#94a3b8" = "#94a3b8";

Defined in: layers/image.ts:67


id ​

ts
readonly id: string;

Defined in: layers/image.ts:65

Implementation of ​

Layer.id


name ​

ts
readonly name: string;

Defined in: layers/image.ts:66


yAxis ​

ts
readonly yAxis: string;

Defined in: layers/image.ts:68

The y axis this layer is bound to.

Implementation of ​

Layer.yAxis

Methods ​

bounds() ​

ts
bounds(): {
  x: Range;
  y: Range;
};

Defined in: layers/image.ts:168

Data-space bounds of this layer, for autoscaling. null if empty.

Returns ​

ts
{
  x: Range;
  y: Range;
}
x ​
ts
x: Range;
y ​
ts
y: Range;

Implementation of ​

Layer.bounds


dispose() ​

ts
dispose(): void;

Defined in: layers/image.ts:186

Returns ​

void

Implementation of ​

Layer.dispose


draw() ​

ts
draw(state): void;

Defined in: layers/image.ts:172

Parameters ​

ParameterType
stateDrawState

Returns ​

void

Implementation of ​

Layer.draw


setData() ​

ts
setData(source, onLoad?): void;

Defined in: layers/image.ts:148

Replace the image source and re-upload the texture (for streaming).

Parameters ​

ParameterType
sourceImageSource
onLoad?() => void

Returns ​

void

MIT licensed. WebGL2 required.