[−][src]Struct stdweb::web::CanvasGradient
The CanvasGradient struct represents an opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient().
Methods
impl CanvasGradient
[src]
impl CanvasGradient
pub fn add_color_stop( | [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
Trait Implementations
impl JsSerialize for CanvasGradient
[src]
impl JsSerialize for CanvasGradient
impl TryFrom<CanvasGradient> for Reference
[src]
impl TryFrom<CanvasGradient> for Reference
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: CanvasGradient) -> Result<Self, Self::Error> | [src] |
impl TryFrom<Reference> for CanvasGradient
[src]
impl TryFrom<Reference> for CanvasGradient
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error> | [src] |
impl<'_r> TryFrom<&'_r Reference> for CanvasGradient
[src]
impl<'_r> TryFrom<&'_r Reference> for CanvasGradient
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error> | [src] |
impl TryFrom<Value> for CanvasGradient
[src]
impl TryFrom<Value> for CanvasGradient
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error> | [src] |
impl<'_r> TryFrom<&'_r Value> for CanvasGradient
[src]
impl<'_r> TryFrom<&'_r Value> for CanvasGradient
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error> | [src] |
impl InstanceOf for CanvasGradient
[src]
impl InstanceOf for CanvasGradient
fn instance_of(reference: &Reference) -> bool | [src] |
impl ReferenceType for CanvasGradient
[src]
impl ReferenceType for CanvasGradient
unsafe fn from_reference_unchecked(reference: Reference) -> Self | [src] |
impl From<CanvasGradient> for Reference
[src]
impl From<CanvasGradient> for Reference
fn from(value: CanvasGradient) -> Self | [src] |
impl Eq for CanvasGradient
[src]
impl Eq for CanvasGradient
impl PartialEq<CanvasGradient> for CanvasGradient
[src]
impl PartialEq<CanvasGradient> for CanvasGradient
fn eq(&self, other: &CanvasGradient) -> bool | [src] |
fn ne(&self, other: &CanvasGradient) -> bool | [src] |
impl AsRef<Reference> for CanvasGradient
[src]
impl AsRef<Reference> for CanvasGradient
impl Clone for CanvasGradient
[src]
impl Clone for CanvasGradient
fn clone(&self) -> CanvasGradient | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for CanvasGradient
[src]
impl Debug for CanvasGradient
Auto Trait Implementations
impl Send for CanvasGradient
impl Send for CanvasGradient
impl Sync for CanvasGradient
impl Sync for CanvasGradient
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |