pub struct Paint(_);
Expand description
NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern. These can be used as paints for strokes and fills.
Implementations§
source§impl Paint
impl Paint
sourcepub fn from_image(
image: &Image,
x: f32,
y: f32,
w: f32,
h: f32,
angle: f32,
alpha: f32
) -> Paint
pub fn from_image( image: &Image, x: f32, y: f32, w: f32, h: f32, angle: f32, alpha: f32 ) -> Paint
Creates and returns an image pattern. Parameters (x
, y
) specify the left-top location of the image pattern,
(w
, h
) is the size of the image, angle
is the rotation around the top-left corner, and image
is the image
to render.
Auto Trait Implementations§
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnwindSafe for Paint
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