[−][src]Struct piet_web::WebRenderContext
Implementations
impl<'_> WebRenderContext<'_>
[src]
pub fn new(
ctx: CanvasRenderingContext2d,
window: Window
) -> WebRenderContext<'static>
[src]
ctx: CanvasRenderingContext2d,
window: Window
) -> WebRenderContext<'static>
Trait Implementations
impl<'_> IntoBrush<WebRenderContext<'_>> for Brush
[src]
fn make_brush<'b>(
&'b self,
_piet: &mut WebRenderContext<'_>,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
[src]
&'b self,
_piet: &mut WebRenderContext<'_>,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
impl<'_> RenderContext for WebRenderContext<'_>
[src]
type Brush = Brush
wasm-bindgen doesn't have a native Point type, so use kurbo's.
type Text = WebText
An associated factory for creating text layouts and related resources.
type TextLayout = WebTextLayout
type Image = WebImage
The associated type of an image.
fn status(&mut self) -> Result<(), Error>
[src]
fn clear(&mut self, color: Color)
[src]
fn solid_brush(&mut self, color: Color) -> Brush
[src]
fn gradient(
&mut self,
gradient: impl Into<FixedGradient>
) -> Result<Brush, Error>
[src]
&mut self,
gradient: impl Into<FixedGradient>
) -> Result<Brush, Error>
fn fill(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
[src]
fn fill_even_odd(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
[src]
fn clip(&mut self, shape: impl Shape)
[src]
fn stroke(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64
)
[src]
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64
)
fn stroke_styled(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
[src]
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
fn text(&mut self) -> &mut Self::Text
[src]
fn draw_text(&mut self, layout: &Self::TextLayout, pos: impl Into<Point>)
[src]
fn save(&mut self) -> Result<(), Error>
[src]
fn restore(&mut self) -> Result<(), Error>
[src]
fn finish(&mut self) -> Result<(), Error>
[src]
fn transform(&mut self, transform: Affine)
[src]
fn current_transform(&self) -> Affine
[src]
fn make_image(
&mut self,
width: usize,
height: usize,
buf: &[u8],
format: ImageFormat
) -> Result<Self::Image, Error>
[src]
&mut self,
width: usize,
height: usize,
buf: &[u8],
format: ImageFormat
) -> Result<Self::Image, Error>
fn draw_image(
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
[src]
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
fn draw_image_area(
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
[src]
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
fn blurred_rect(
&mut self,
rect: Rect,
blur_radius: f64,
brush: &impl IntoBrush<Self>
)
[src]
&mut self,
rect: Rect,
blur_radius: f64,
brush: &impl IntoBrush<Self>
)
fn with_save(
&mut self,
f: impl FnOnce(&mut Self) -> Result<(), Error>
) -> Result<(), Error>
[src]
&mut self,
f: impl FnOnce(&mut Self) -> Result<(), Error>
) -> Result<(), Error>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for WebRenderContext<'a>
impl<'a> !Send for WebRenderContext<'a>
impl<'a> !Sync for WebRenderContext<'a>
impl<'a> Unpin for WebRenderContext<'a>
impl<'a> !UnwindSafe for WebRenderContext<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
[src]
fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
fn round_into(self) -> U
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,