Struct canvas::canvas_data::CanvasPaintState
source · pub struct CanvasPaintState<'a> {
pub draw_options: DrawOptions,
pub fill_style: Pattern<'a>,
pub stroke_style: Pattern<'a>,
pub stroke_opts: StrokeOptions,
pub transform: Transform2D<f32>,
pub shadow_offset_x: f64,
pub shadow_offset_y: f64,
pub shadow_blur: f64,
pub shadow_color: Color,
pub font_style: Option<Arc<Font>>,
pub text_align: TextAlign,
pub text_baseline: TextBaseline,
}
Fields§
§draw_options: DrawOptions
§fill_style: Pattern<'a>
§stroke_style: Pattern<'a>
§stroke_opts: StrokeOptions
§transform: Transform2D<f32>
The current 2D transform matrix.
shadow_offset_x: f64
§shadow_offset_y: f64
§shadow_blur: f64
§shadow_color: Color
§font_style: Option<Arc<Font>>
§text_align: TextAlign
§text_baseline: TextBaseline
Implementations§
source§impl<'a> CanvasPaintState<'a>
impl<'a> CanvasPaintState<'a>
pub fn new(_antialias: AntialiasMode) -> CanvasPaintState<'a>
Trait Implementations§
source§impl<'a> Clone for CanvasPaintState<'a>
impl<'a> Clone for CanvasPaintState<'a>
source§fn clone(&self) -> CanvasPaintState<'a>
fn clone(&self) -> CanvasPaintState<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for CanvasPaintState<'a>
impl<'a> RefUnwindSafe for CanvasPaintState<'a>
impl<'a> Send for CanvasPaintState<'a>
impl<'a> Sync for CanvasPaintState<'a>
impl<'a> Unpin for CanvasPaintState<'a>
impl<'a> UnwindSafe for CanvasPaintState<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert