pub struct RenderContext<'cache, Target: ?Sized> { /* private fields */ }
Expand description
The whole point.
Implementations§
Source§impl<T: AsPixmapMut + ?Sized> RenderContext<'_, T>
impl<T: AsPixmapMut + ?Sized> RenderContext<'_, T>
Sourcepub fn bitmap_scale(&self) -> f64
pub fn bitmap_scale(&self) -> f64
Get the bitmap scale.
Sourcepub fn set_bitmap_scale(&mut self, scale: f64)
pub fn set_bitmap_scale(&mut self, scale: f64)
Set the bitmap scale.
Sourcepub fn set_tolerance(&mut self, tolerance: f64)
pub fn set_tolerance(&mut self, tolerance: f64)
Set the flattening tolerance.
Sourcepub fn target_mut(&mut self) -> &mut T
pub fn target_mut(&mut self) -> &mut T
Get the inner target.
Sourcepub fn into_target(self) -> Twhere
T: Sized,
pub fn into_target(self) -> Twhere
T: Sized,
Unwrap this type and reduce it to the inner target.
Trait Implementations§
Source§impl<T: AsPixmapMut + ?Sized> RenderContext for RenderContext<'_, T>
impl<T: AsPixmapMut + ?Sized> RenderContext for RenderContext<'_, T>
Source§type TextLayout = TextLayout
type TextLayout = TextLayout
The type use to represent text layout objects.
Source§fn gradient(
&mut self,
gradient: impl Into<FixedGradient>,
) -> Result<Self::Brush, Pierror>
fn gradient( &mut self, gradient: impl Into<FixedGradient>, ) -> Result<Self::Brush, Pierror>
Create a new gradient brush.
Source§fn stroke(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
)
fn stroke( &mut self, shape: impl Shape, brush: &impl IntoBrush<Self>, width: f64, )
Stroke a
Shape
, using the default StrokeStyle
.Source§fn stroke_styled(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle,
)
fn stroke_styled( &mut self, shape: impl Shape, brush: &impl IntoBrush<Self>, width: f64, style: &StrokeStyle, )
Stroke a
Shape
, providing a custom StrokeStyle
.Source§fn fill(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
fn fill(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
Fill a
Shape
, using the non-zero fill rule.Source§fn fill_even_odd(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
fn fill_even_odd(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
Fill a shape, using the even-odd fill rule.
Source§fn draw_text(&mut self, layout: &Self::TextLayout, pos: impl Into<Point>)
fn draw_text(&mut self, layout: &Self::TextLayout, pos: impl Into<Point>)
Draw a
TextLayout
. Read moreSource§fn make_image(
&mut self,
width: usize,
height: usize,
buf: &[u8],
format: ImageFormat,
) -> Result<Self::Image, Pierror>
fn make_image( &mut self, width: usize, height: usize, buf: &[u8], format: ImageFormat, ) -> Result<Self::Image, Pierror>
Source§fn draw_image(
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode,
)
fn draw_image( &mut self, image: &Self::Image, dst_rect: impl Into<Rect>, interp: InterpolationMode, )
Source§fn draw_image_area(
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
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, )
Source§fn capture_image_area(
&mut self,
src_rect: impl Into<Rect>,
) -> Result<Self::Image, Pierror>
fn capture_image_area( &mut self, src_rect: impl Into<Rect>, ) -> Result<Self::Image, Pierror>
Source§fn blurred_rect(
&mut self,
input_rect: Rect,
blur_radius: f64,
brush: &impl IntoBrush<Self>,
)
fn blurred_rect( &mut self, input_rect: Rect, blur_radius: f64, brush: &impl IntoBrush<Self>, )
Draw a rectangle with Gaussian blur. Read more
Source§fn current_transform(&self) -> Affine
fn current_transform(&self) -> Affine
Returns the transformations currently applied to the context.
impl<T: AsPixmapMut + ?Sized> IntoBrush<RenderContext<'_, T>> for Brush
Auto Trait Implementations§
impl<'cache, Target> Freeze for RenderContext<'cache, Target>
impl<'cache, Target> !RefUnwindSafe for RenderContext<'cache, Target>
impl<'cache, Target> !Send for RenderContext<'cache, Target>
impl<'cache, Target> !Sync for RenderContext<'cache, Target>
impl<'cache, Target> Unpin for RenderContext<'cache, Target>
impl<'cache, Target> !UnwindSafe for RenderContext<'cache, Target>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.