skia_safe

Struct RRect

Source
pub struct RRect(/* private fields */);

Implementations§

Source§

impl RRect

Source

pub const SIZE_IN_MEMORY: usize = 52usize

Source

pub fn new() -> Self

Source

pub fn get_type(&self) -> Type

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_rect(&self) -> bool

Source

pub fn is_oval(&self) -> bool

Source

pub fn is_simple(&self) -> bool

Source

pub fn is_nine_patch(&self) -> bool

Source

pub fn is_complex(&self) -> bool

Source

pub fn width(&self) -> scalar

Source

pub fn height(&self) -> scalar

Source

pub fn simple_radii(&self) -> Vector

Source

pub fn set_empty(&mut self)

Source

pub fn set_rect(&mut self, rect: impl AsRef<Rect>)

Source

pub fn new_empty() -> Self

Source

pub fn new_rect(rect: impl AsRef<Rect>) -> Self

Source

pub fn new_oval(oval: impl AsRef<Rect>) -> Self

Source

pub fn new_rect_xy(rect: impl AsRef<Rect>, x_rad: scalar, y_rad: scalar) -> Self

Source

pub fn new_nine_patch( rect: impl AsRef<Rect>, left_rad: scalar, top_rad: scalar, right_rad: scalar, bottom_rad: scalar, ) -> Self

Source

pub fn new_rect_radii(rect: impl AsRef<Rect>, radii: &[Vector; 4]) -> Self

Source

pub fn set_oval(&mut self, oval: impl AsRef<Rect>)

Source

pub fn set_rect_xy( &mut self, rect: impl AsRef<Rect>, x_rad: scalar, y_rad: scalar, )

Source

pub fn set_nine_patch( &mut self, rect: impl AsRef<Rect>, left_rad: scalar, top_rad: scalar, right_rad: scalar, bottom_rad: scalar, )

Source

pub fn set_rect_radii(&mut self, rect: impl AsRef<Rect>, radii: &[Vector; 4])

Source

pub fn rect(&self) -> &Rect

Source

pub fn radii(&self, corner: Corner) -> Vector

Source

pub fn radii_ref(&self) -> &[Vector; 4]

Source

pub fn bounds(&self) -> &Rect

Source

pub fn inset(&mut self, delta: impl Into<Vector>)

Source

pub fn with_inset(&self, delta: impl Into<Vector>) -> Self

Source

pub fn outset(&mut self, delta: impl Into<Vector>)

Source

pub fn with_outset(&self, delta: impl Into<Vector>) -> Self

Source

pub fn offset(&mut self, delta: impl Into<Vector>)

Source

pub fn with_offset(&self, delta: impl Into<Vector>) -> Self

Source

pub fn contains(&self, rect: impl AsRef<Rect>) -> bool

Source

pub fn is_valid(&self) -> bool

Source

pub fn write_to_memory(&self, buffer: &mut Vec<u8>)

Source

pub fn read_from_memory(&mut self, buffer: &[u8]) -> usize

Source

pub fn transform(&self, matrix: &Matrix) -> Option<Self>

Source

pub fn dump(&self, as_hex: impl Into<Option<bool>>)

Source

pub fn dump_to_string(&self, as_hex: bool) -> String

Source

pub fn dump_hex(&self)

Trait Implementations§

Source§

impl AsRef<RRect> for RRect

Source§

fn as_ref(&self) -> &RRect

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for RRect

Source§

fn clone(&self) -> RRect

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RRect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RRect

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RRect

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RRect

Auto Trait Implementations§

§

impl Freeze for RRect

§

impl RefUnwindSafe for RRect

§

impl Send for RRect

§

impl Sync for RRect

§

impl Unpin for RRect

§

impl UnwindSafe for RRect

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<N, T> NativeTransmutableWrapper<N> for T
where T: NativeTransmutable<N>,

Source§

fn wrap(native: N) -> T

Source§

fn unwrap(self) -> N

Source§

fn inner(&self) -> &N

Source§

fn inner_mut(&mut self) -> &mut N

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.