pub struct CornersSquareOptions {
pub square_type: CornerSquareType,
pub color: Color,
pub gradient: Option<Gradient>,
}Expand description
Options for styling QR code corner squares (finder patterns).
Fields§
§square_type: CornerSquareTypeThe type/style of corner squares.
color: ColorSolid color for corner squares (ignored if gradient is set).
gradient: Option<Gradient>Optional gradient for corner squares.
Implementations§
Source§impl CornersSquareOptions
impl CornersSquareOptions
Sourcepub fn new(square_type: CornerSquareType) -> Self
pub fn new(square_type: CornerSquareType) -> Self
Create new corner square options with a specific type.
Sourcepub fn with_type(self, square_type: CornerSquareType) -> Self
pub fn with_type(self, square_type: CornerSquareType) -> Self
Set the square type.
Sourcepub fn with_color(self, color: Color) -> Self
pub fn with_color(self, color: Color) -> Self
Set the color.
Sourcepub fn with_gradient(self, gradient: Gradient) -> Self
pub fn with_gradient(self, gradient: Gradient) -> Self
Set the gradient.
Trait Implementations§
Source§impl Clone for CornersSquareOptions
impl Clone for CornersSquareOptions
Source§fn clone(&self) -> CornersSquareOptions
fn clone(&self) -> CornersSquareOptions
Returns a duplicate 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 moreSource§impl Debug for CornersSquareOptions
impl Debug for CornersSquareOptions
Source§impl Default for CornersSquareOptions
impl Default for CornersSquareOptions
Source§impl PartialEq for CornersSquareOptions
impl PartialEq for CornersSquareOptions
impl StructuralPartialEq for CornersSquareOptions
Auto Trait Implementations§
impl Freeze for CornersSquareOptions
impl RefUnwindSafe for CornersSquareOptions
impl Send for CornersSquareOptions
impl Sync for CornersSquareOptions
impl Unpin for CornersSquareOptions
impl UnwindSafe for CornersSquareOptions
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§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.