Liking cljdoc? Tell your friends :D

html.HTMLCanvasElement

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

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

capture-streamcljs

(capture-stream this frame-rate)

Method.

The html.HTMLCanvasElement captureStream() method returns a which includes a web.CanvasCaptureMediaStreamTrack containing 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 `html.HTMLCanvasElement` captureStream() method returns a
which includes a `web.CanvasCaptureMediaStreamTrack` containing
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 web.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 `web.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 web.<canvas> element interpreted CSS pixels. When the attribute is not specified, or if it is to an invalid value, like a negative, the default value of 150 used.

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 `web.<canvas>` element interpreted
CSS pixels. When the attribute is not specified, or if it is
to an invalid value, like a negative, the default value of 150
used.

`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 file.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 `file.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 web.Boolean the moz-opaque HTML attribute of the web.<canvas> element. lets the canvas know whether or not translucency will be a factor. the canvas knows there's no translucency, painting performance be 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 `web.Boolean`
the moz-opaque HTML attribute of the `web.<canvas>` element.
lets the canvas know whether or not translucency will be a factor.
the canvas knows there's no translucency, painting performance
be 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 web.<canvas> element interpreted CSS pixels. When the attribute is not specified, or if it is to an invalid value, like a negative, the default value of 150 used.

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 `web.<canvas>` element interpreted
CSS pixels. When the attribute is not specified, or if it is
to an invalid value, like a negative, the default value of 150
used.

`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 web.Boolean the moz-opaque HTML attribute of the web.<canvas> element. lets the canvas know whether or not translucency will be a factor. the canvas knows there's no translucency, painting performance be 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 `web.Boolean`
the moz-opaque HTML attribute of the `web.<canvas>` element.
lets the canvas know whether or not translucency will be a factor.
the canvas knows there's no translucency, painting performance
be 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 web.<canvas> element interpreted CSS pixels. When the attribute is not specified, or if it is to an invalid value, like a negative, the default value of 300 used.

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 `web.<canvas>` element interpreted
CSS pixels. When the attribute is not specified, or if it is
to an invalid value, like a negative, the default value of 300
used.

`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.Blob object the image contained in the canvas; this file may be cached on disk or stored in memory at the discretion of the user agent. type is not specified, the image type is image/png. The created 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.Blob` object
the image contained in the canvas; this file may be cached on
disk or stored in memory at the discretion of the user agent.
type is not specified, the image type is image/png. The created
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.OffscreenCanvas object, either on the main thread 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.OffscreenCanvas` object, either on the main thread
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 web.<canvas> element interpreted CSS pixels. When the attribute is not specified, or if it is to an invalid value, like a negative, the default value of 300 used.

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 `web.<canvas>` element interpreted
CSS pixels. When the attribute is not specified, or if it is
to an invalid value, like a negative, the default value of 300
used.

`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