pub struct BackgroundOptions {
pub color: Color,
pub gradient: Option<Gradient>,
pub round: f64,
}Expand description
Options for styling QR code background.
Fields§
§color: ColorSolid color for background (ignored if gradient is set).
gradient: Option<Gradient>Optional gradient for background.
round: f64Corner radius ratio (0.0 to 1.0, where 0.5 = fully rounded).
Implementations§
Source§impl BackgroundOptions
impl BackgroundOptions
Sourcepub fn transparent() -> Self
pub fn transparent() -> Self
Create transparent background.
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.
Sourcepub fn with_round(self, round: f64) -> Self
pub fn with_round(self, round: f64) -> Self
Set the corner radius ratio.
Trait Implementations§
Source§impl Clone for BackgroundOptions
impl Clone for BackgroundOptions
Source§fn clone(&self) -> BackgroundOptions
fn clone(&self) -> BackgroundOptions
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 BackgroundOptions
impl Debug for BackgroundOptions
Source§impl Default for BackgroundOptions
impl Default for BackgroundOptions
Source§impl PartialEq for BackgroundOptions
impl PartialEq for BackgroundOptions
impl StructuralPartialEq for BackgroundOptions
Auto Trait Implementations§
impl Freeze for BackgroundOptions
impl RefUnwindSafe for BackgroundOptions
impl Send for BackgroundOptions
impl Sync for BackgroundOptions
impl Unpin for BackgroundOptions
impl UnwindSafe for BackgroundOptions
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.