[−][src]Struct blend2d::pattern::Pattern
Methods
impl Pattern
[src]
pub fn new(
image: &Image,
area: Option<&RectI>,
extend_mode: ExtendMode,
matrix: Option<&Matrix2D>
) -> Pattern
[src]
image: &Image,
area: Option<&RectI>,
extend_mode: ExtendMode,
matrix: Option<&Matrix2D>
) -> Pattern
Creates a new pattern that borrows the given Image
immutably for its
lifetime.
pub fn image(&self) -> &Image
[src]
The pattern's Image
.
pub fn with_new_image(self, image: &Image) -> Result<Pattern>
[src]
Returns this pattern with a new Image
.
There is no set function because such a function would not be able to change the pattern's lifetime.
pub fn with_new_image_clipped(
self,
image: &Image,
area: &RectI
) -> Result<Pattern>
[src]
self,
image: &Image,
area: &RectI
) -> Result<Pattern>
Returns this pattern with a new clipped Image
.
pub fn area(&self) -> &RectI
[src]
The clipping area.
pub fn set_area(&mut self, area: &RectI) -> Result<()>
[src]
Sets the clipping area.
pub fn reset_area(&mut self)
[src]
Resets the clipping area to zero.
pub fn extend_mode(&self) -> ExtendMode
[src]
The pattern's ExtendMode
.
pub fn set_extend_mode(&mut self, mode: ExtendMode)
[src]
Sets the pattern's ExtendMode
.
pub fn reset_extend_mode(&mut self)
[src]
Resets the pattern's ExtendMode
to the default.
pub fn matrix(&self) -> &Matrix2D
[src]
SThe pattern's Matrix2D
Trait Implementations
impl DeepClone for Pattern
[src]
const ASSIGN_DEEP: unsafe extern "C" fn(_: *mut Self::Core, _: *const Self::Core) -> BLResult
[src]
fn clone_deep(&self) -> Self
[src]
Returns a deeply cloned copy of the value.
impl MatrixTransform for Pattern
[src]
fn set_matrix(&mut self, m: &Matrix2D)
[src]
Set the transformation matrix of this type to m.
fn reset_matrix(&mut self)
[src]
Reset the transformation matrix.
fn translate(&mut self, x: f64, y: f64)
[src]
Translate the transformation matrix.
fn translate_point<P: Point>(&mut self, p: &P)
[src]
Translate the transformation matrix.
fn scale(&mut self, x: f64, y: f64)
[src]
Scale the transformation matrix.
fn scale_point<P: Point>(&mut self, p: &P)
[src]
Scale the transformation matrix.
fn skew(&mut self, x: f64, y: f64)
[src]
Skew the transformation matrix.
fn skew_point<P: Point>(&mut self, p: &P)
[src]
Skew the transformation matrix.
fn rotate(&mut self, angle: f64)
[src]
Rotate the transformation matrix.
fn rotate_around(&mut self, angle: f64, x: f64, y: f64)
[src]
Rotate the transformation matrix around a point.
fn rotate_around_point<P: Point>(&mut self, angle: f64, p: &P)
[src]
Rotate the transformation matrix around a point.
fn transform(&mut self, mat: &Matrix2D)
[src]
Transform the transformation matrix.
fn post_translate(&mut self, x: f64, y: f64)
[src]
Post-translate the transformation matrix.
fn post_translate_point<P: Point>(&mut self, p: &P)
[src]
Post-translate the transformation matrix.
fn post_scale(&mut self, x: f64, y: f64)
[src]
Post-scale the transformation matrix.
fn post_scale_point<P: Point>(&mut self, p: &P)
[src]
Post-scale the transformation matrix.
fn post_skew(&mut self, x: f64, y: f64)
[src]
Post-skew the transformation matrix.
fn post_skew_point<P: Point>(&mut self, p: &P)
[src]
Post-skew the transformation matrix.
fn post_rotate(&mut self, angle: f64)
[src]
Post-rotate the transformation matrix.
fn post_rotate_around(&mut self, angle: f64, x: f64, y: f64)
[src]
Post-rotate the transformation matrix around a point.
fn post_rotate_around_point<P: Point>(&mut self, angle: f64, p: &P)
[src]
Post-rotate the transformation matrix around a point.
fn post_transform(&mut self, mat: &Matrix2D)
[src]
Post-transform the transformation matrix.
impl<'_> From<&'_ Image> for Pattern
[src]
impl PartialEq<Pattern> for Pattern
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Pattern
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Drop for Pattern
[src]
impl Debug for Pattern
[src]
Auto Trait Implementations
impl Unpin for Pattern
impl !Sync for Pattern
impl !Send for Pattern
impl RefUnwindSafe for Pattern
impl UnwindSafe for Pattern
Blanket Implementations
impl<T> ArrayType for T where
T: WrappedBlCore,
[src]
T: WrappedBlCore,
const IMPL_IDX: usize
[src]
unsafe fn push(&mut BLArrayCore, T)
[src]
unsafe fn insert(&mut BLArrayCore, usize, T)
[src]
unsafe fn replace(&mut BLArrayCore, usize, T)
[src]
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,