From ac7970b75e2d2eca459db604803b32579f092297 Mon Sep 17 00:00:00 2001 From: CodeAssemblingChicken <53775955+CodeAssemblingChicken@users.noreply.github.com> Date: Tue, 8 Jun 2021 19:53:10 +0200 Subject: [PATCH] Allow to change quiet_zone size --- src/render/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/render/mod.rs b/src/render/mod.rs index 32fff6e..f6f53e1 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -97,6 +97,13 @@ impl<'a, P: Pixel> Renderer<'a, P> { self } + /// Sets the size of the quiet zone in the generated image. + /// Default: 4 for Normal QR code and 2 for Micro QR code + pub fn quiet_zone_size(&mut self, quiet_zone: u32) -> &mut Self { + self.quiet_zone = quiet_zone; + self + } + /// Whether to include the quiet zone in the generated image. pub fn quiet_zone(&mut self, has_quiet_zone: bool) -> &mut Self { self.has_quiet_zone = has_quiet_zone;