Struct stdweb::web::CanvasRenderingContext2d [] [src]

pub struct CanvasRenderingContext2d(_);

Used for drawing rectangles, text, images and other objects onto the canvas element.

(JavaScript docs)

Methods

impl CanvasRenderingContext2d
[src]

[src]

Draws a filled rectangle whose starting point is at the coordinates (x, y) with the specified width and height and whose style is determined by the fillStyle attribute.

(JavaScript docs)

[src]

Draws a text string at the specified coordinates, filling the string's characters with the current foreground color. An optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.

(JavaScript docs)

Trait Implementations

impl Clone for CanvasRenderingContext2d
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for CanvasRenderingContext2d
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for CanvasRenderingContext2d
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for CanvasRenderingContext2d
[src]

impl InstanceOf for CanvasRenderingContext2d
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for CanvasRenderingContext2d
[src]

[src]

Performs the conversion.

impl ReferenceType for CanvasRenderingContext2d
[src]

[src]

Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more

impl TryFrom<Reference> for CanvasRenderingContext2d
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Reference> for CanvasRenderingContext2d
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for CanvasRenderingContext2d
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Value> for CanvasRenderingContext2d
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for CanvasRenderingContext2d
[src]

impl RenderingContext for CanvasRenderingContext2d
[src]

Type of error which can occur whilst creating this context

[src]

Name which identifies this kind of rendering context.