pub struct MaskPositionBuilder {
pub point: String,
pub x_shift: OrderedFloat<f64>,
pub y_shift: OrderedFloat<f64>,
pub scale: OrderedFloat<f64>,
}Expand description
This object describes the position on faces where a mask should be placed by default.
Fields§
§point: StringThe part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
x_shift: OrderedFloat<f64>Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
y_shift: OrderedFloat<f64>Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
scale: OrderedFloat<f64>Mask scaling coefficient. For example, 2.0 means double size.
Implementations§
Source§impl MaskPositionBuilder
impl MaskPositionBuilder
pub fn new( point: String, x_shift: OrderedFloat<f64>, y_shift: OrderedFloat<f64>, scale: OrderedFloat<f64>, ) -> Self
Sourcepub fn set_point(self, point: String) -> Self
pub fn set_point(self, point: String) -> Self
The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
Sourcepub fn set_x_shift(self, x_shift: OrderedFloat<f64>) -> Self
pub fn set_x_shift(self, x_shift: OrderedFloat<f64>) -> Self
Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
Sourcepub fn set_y_shift(self, y_shift: OrderedFloat<f64>) -> Self
pub fn set_y_shift(self, y_shift: OrderedFloat<f64>) -> Self
Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
Sourcepub fn set_scale(self, scale: OrderedFloat<f64>) -> Self
pub fn set_scale(self, scale: OrderedFloat<f64>) -> Self
Mask scaling coefficient. For example, 2.0 means double size.
pub fn build(self) -> MaskPosition
Trait Implementations§
Source§impl Clone for MaskPositionBuilder
impl Clone for MaskPositionBuilder
Source§fn clone(&self) -> MaskPositionBuilder
fn clone(&self) -> MaskPositionBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaskPositionBuilder
impl Debug for MaskPositionBuilder
Source§impl Default for MaskPositionBuilder
impl Default for MaskPositionBuilder
Source§fn default() -> MaskPositionBuilder
fn default() -> MaskPositionBuilder
Source§impl<'de> Deserialize<'de> for MaskPositionBuilder
impl<'de> Deserialize<'de> for MaskPositionBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MaskPositionBuilder
impl Hash for MaskPositionBuilder
Source§impl Ord for MaskPositionBuilder
impl Ord for MaskPositionBuilder
Source§fn cmp(&self, other: &MaskPositionBuilder) -> Ordering
fn cmp(&self, other: &MaskPositionBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MaskPositionBuilder
impl PartialEq for MaskPositionBuilder
Source§impl PartialOrd for MaskPositionBuilder
impl PartialOrd for MaskPositionBuilder
Source§impl Serialize for MaskPositionBuilder
impl Serialize for MaskPositionBuilder
impl Eq for MaskPositionBuilder
impl StructuralPartialEq for MaskPositionBuilder
Auto Trait Implementations§
impl Freeze for MaskPositionBuilder
impl RefUnwindSafe for MaskPositionBuilder
impl Send for MaskPositionBuilder
impl Sync for MaskPositionBuilder
impl Unpin for MaskPositionBuilder
impl UnwindSafe for MaskPositionBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.