Struct stdweb::web::CanvasGradient [] [src]

pub struct CanvasGradient(_);

The CanvasGradient struct represents an opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient().

(JavaScript docs)

Methods

impl CanvasGradient
[src]

[src]

Adds a new stop, defined by an offset and a color, to the gradient. If the offset is not between 0 and 1, an INDEX_SIZE_ERR is returned, if the color can't be parsed as a CSS , a SYNTAX_ERR is returned.

(JavaScript docs)

Trait Implementations

impl Clone for CanvasGradient
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for CanvasGradient
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for CanvasGradient
[src]

impl PartialEq for CanvasGradient
[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 InstanceOf for CanvasGradient
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for CanvasGradient
[src]

[src]

Performs the conversion.

impl ReferenceType for CanvasGradient
[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 From<CanvasGradient> for Reference
[src]

[src]

Performs the conversion.

impl TryFrom<CanvasGradient> for Reference
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Reference> for CanvasGradient
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

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

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for CanvasGradient
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

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

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for CanvasGradient
[src]

Auto Trait Implementations