Liking cljdoc? Tell your friends :D

web.canvas.HTMLCanvasElement

The HTMLCanvasElement interface provides properties and methods manipulating the layout and presentation of <canvas> elements. HTMLCanvasElement interface also inherits the properties and of the web.dom.HTMLElement interface.

The HTMLCanvasElement interface provides properties and methods
manipulating the layout and presentation of `<canvas>` elements.
HTMLCanvasElement interface also inherits the properties and
of the `web.dom.HTMLElement` interface.
raw docstring

capture-streamcljs

(capture-stream this frame-rate)

Method.

The web.canvas.HTMLCanvasElement captureStream() method returns web.streams.MediaStream which includes a web.media.CanvasCaptureMediaStreamTrack a real-time video capture of the canvas's contents.

MediaStream = canvas.captureStream(frameRate);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream

Method.

The `web.canvas.HTMLCanvasElement` captureStream() method returns
`web.streams.MediaStream` which includes a `web.media.CanvasCaptureMediaStreamTrack`
a real-time video capture of the canvas's contents.

`MediaStream = canvas.captureStream(frameRate);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream`
sourceraw docstring

get-contextcljs

(get-context this & args)

Method.

The HTMLCanvasElement.getContext() method returns a drawing context the canvas, or js.null if the context identifier is not supported.

var ctx = canvas.getContext(contextType); var ctx = canvas.getContext(contextType, contextAttributes);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext

Method.

The HTMLCanvasElement.getContext() method returns a drawing context
the canvas, or `js.null` if the context identifier is not supported.

`var ctx = canvas.getContext(contextType);
var ctx = canvas.getContext(contextType, contextAttributes);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext`
sourceraw docstring

heightcljs

(height this)

Property.

The HTMLCanvasElement.height property is a positive integer reflecting height HTML attribute of the <canvas> element interpreted in pixels. When the attribute is not specified, or if it is set an invalid value, like a negative, the default value of 150 is

var pxl = canvas.height; canvas.height = pxl;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/height

Property.

The HTMLCanvasElement.height property is a positive integer reflecting
height HTML attribute of the `<canvas>` element interpreted in
pixels. When the attribute is not specified, or if it is set
an invalid value, like a negative, the default value of 150 is

`var pxl = canvas.height;
canvas.height = pxl;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/height`
sourceraw docstring

moz-fetch-as-streamcljs

(moz-fetch-as-stream this callback type)

Method.

The HTMLCanvasElement.mozFetchAsStream() internal method used create a new input stream that, when ready, would provide the of the canvas as image data. However, this non-standard and internal has been removed.

void canvas.mozFetchAsStream(callback, type);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozFetchAsStream

Method.

The HTMLCanvasElement.mozFetchAsStream() internal method used
create a new input stream that, when ready, would provide the
of the canvas as image data. However, this non-standard and internal
has been removed.

`void canvas.mozFetchAsStream(callback, type);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozFetchAsStream`
sourceraw docstring

moz-get-as-filecljs

(moz-get-as-file this name type)

Method.

The HTMLCanvasElement.mozGetAsFile() method returns a web.files.File representing the image contained in the canvas; this file is memory-based file, with the specified name. If type is not specified, image type is image/png.

canvas.mozGetAsFile(name, type);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozGetAsFile

Method.

The HTMLCanvasElement.mozGetAsFile() method returns a `web.files.File`
representing the image contained in the canvas; this file is
memory-based file, with the specified name. If type is not specified,
image type is image/png.

`canvas.mozGetAsFile(name, type);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozGetAsFile`
sourceraw docstring

moz-opaquecljs

(moz-opaque this)

Property.

The non-standard HTMLCanvasElement.mozOpaque property is a js.Boolean the moz-opaque HTML attribute of the <canvas> element. It lets canvas know whether or not translucency will be a factor. If canvas knows there's no translucency, painting performance can optimized.

var opaque = canvas.mozOpaque; canvas.mozOpaque = true;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque

Property.

The non-standard HTMLCanvasElement.mozOpaque property is a `js.Boolean`
the moz-opaque HTML attribute of the `<canvas>` element. It lets
canvas know whether or not translucency will be a factor. If
canvas knows there's no translucency, painting performance can
optimized.

`var opaque = canvas.mozOpaque;
canvas.mozOpaque = true;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque`
sourceraw docstring

set-height!cljs

(set-height! this val)

Property.

The HTMLCanvasElement.height property is a positive integer reflecting height HTML attribute of the <canvas> element interpreted in pixels. When the attribute is not specified, or if it is set an invalid value, like a negative, the default value of 150 is

var pxl = canvas.height; canvas.height = pxl;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/height

Property.

The HTMLCanvasElement.height property is a positive integer reflecting
height HTML attribute of the `<canvas>` element interpreted in
pixels. When the attribute is not specified, or if it is set
an invalid value, like a negative, the default value of 150 is

`var pxl = canvas.height;
canvas.height = pxl;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/height`
sourceraw docstring

set-moz-opaque!cljs

(set-moz-opaque! this val)

Property.

The non-standard HTMLCanvasElement.mozOpaque property is a js.Boolean the moz-opaque HTML attribute of the <canvas> element. It lets canvas know whether or not translucency will be a factor. If canvas knows there's no translucency, painting performance can optimized.

var opaque = canvas.mozOpaque; canvas.mozOpaque = true;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque

Property.

The non-standard HTMLCanvasElement.mozOpaque property is a `js.Boolean`
the moz-opaque HTML attribute of the `<canvas>` element. It lets
canvas know whether or not translucency will be a factor. If
canvas knows there's no translucency, painting performance can
optimized.

`var opaque = canvas.mozOpaque;
canvas.mozOpaque = true;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque`
sourceraw docstring

set-width!cljs

(set-width! this val)

Property.

The HTMLCanvasElement.width property is a positive integer reflecting width HTML attribute of the <canvas> element interpreted in pixels. When the attribute is not specified, or if it is set an invalid value, like a negative, the default value of 300 is

var pxl = canvas.width; canvas.width = pxl;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width

Property.

The HTMLCanvasElement.width property is a positive integer reflecting
width HTML attribute of the `<canvas>` element interpreted in
pixels. When the attribute is not specified, or if it is set
an invalid value, like a negative, the default value of 300 is

`var pxl = canvas.width;
canvas.width = pxl;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width`
sourceraw docstring

to-blobcljs

(to-blob this callback mime-type quality-argument)

Method.

The HTMLCanvasElement.toBlob() method creates a web.files.Blob representing the image contained in the canvas; this file may cached on the disk or stored in memory at the discretion of the agent. If type is not specified, the image type is image/png. created image is in a resolution of 96dpi.

canvas.toBlob(callback, mimeType, qualityArgument);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob

Method.

The HTMLCanvasElement.toBlob() method creates a `web.files.Blob`
representing the image contained in the canvas; this file may
cached on the disk or stored in memory at the discretion of the
agent. If type is not specified, the image type is image/png.
created image is in a resolution of 96dpi.

`canvas.toBlob(callback, mimeType, qualityArgument);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob`
sourceraw docstring

to-data-urlcljs

(to-data-url this type encoder-options)

Method.

The HTMLCanvasElement.toDataURL() method returns a data URI containing representation of the image in the format specified by the type (defaults to PNG). The returned image is in a resolution of 96

canvas.toDataURL(type, encoderOptions);

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL

Method.

The HTMLCanvasElement.toDataURL() method returns a data URI containing
representation of the image in the format specified by the type
(defaults to PNG). The returned image is in a resolution of 96

`canvas.toDataURL(type, encoderOptions);`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL`
sourceraw docstring

transfer-control-to-offscreencljs

(transfer-control-to-offscreen this)

Method.

The HTMLCanvasElement.transferControlToOffscreen() method transfers to an web.canvas.OffscreenCanvas object, either on the main or on a worker.

OffscreenCanvas HTMLCanvasElement.transferControlToOffscreen()

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen

Method.

The HTMLCanvasElement.transferControlToOffscreen() method transfers
to an `web.canvas.OffscreenCanvas` object, either on the main
or on a worker.

`OffscreenCanvas HTMLCanvasElement.transferControlToOffscreen()`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen`
sourceraw docstring

widthcljs

(width this)

Property.

The HTMLCanvasElement.width property is a positive integer reflecting width HTML attribute of the <canvas> element interpreted in pixels. When the attribute is not specified, or if it is set an invalid value, like a negative, the default value of 300 is

var pxl = canvas.width; canvas.width = pxl;

See also: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width

Property.

The HTMLCanvasElement.width property is a positive integer reflecting
width HTML attribute of the `<canvas>` element interpreted in
pixels. When the attribute is not specified, or if it is set
an invalid value, like a negative, the default value of 300 is

`var pxl = canvas.width;
canvas.width = pxl;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close