Allow to change quiet_zone size

This commit is contained in:
CodeAssemblingChicken 2021-06-08 19:53:10 +02:00 committed by GitHub
parent 59a30b9d12
commit ac7970b75e

View file

@ -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;