Add branding to labels
This commit is contained in:
parent
1a9f0f2e7d
commit
e053d491d1
|
@ -60,6 +60,7 @@ pub struct LabelConfig {
|
||||||
code128: Option<Code128Config>,
|
code128: Option<Code128Config>,
|
||||||
id_text: Option<TextConfig>,
|
id_text: Option<TextConfig>,
|
||||||
short_id_text: Option<TextConfig>,
|
short_id_text: Option<TextConfig>,
|
||||||
|
branding: Option<TextConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -170,6 +171,10 @@ impl LabelPage {
|
||||||
cfg.draw(layer, font, self.short_id.as_ref())?;
|
cfg.draw(layer, font, self.short_id.as_ref())?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(cfg) = &config.branding {
|
||||||
|
cfg.draw(layer, font, Some("li7y"))?;
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,14 +32,18 @@ impl Into<LabelConfig> for LabelPreset {
|
||||||
position: (Mm(0.0), Mm(22.0)),
|
position: (Mm(0.0), Mm(22.0)),
|
||||||
}),
|
}),
|
||||||
short_id_text: None,
|
short_id_text: None,
|
||||||
|
branding: Some(TextConfig {
|
||||||
|
font_size: 7.0,
|
||||||
|
position: (Mm(39.5), Mm(0.6)),
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
Self::SeikoSlpMrlCode128 => LabelConfig {
|
Self::SeikoSlpMrlCode128 => LabelConfig {
|
||||||
width: Mm(44.45),
|
width: Mm(44.45),
|
||||||
height: Mm(24.13),
|
height: Mm(24.13),
|
||||||
data_matrix: None,
|
data_matrix: None,
|
||||||
code128: Some(Code128Config {
|
code128: Some(Code128Config {
|
||||||
scale: (Mm(44.45), Mm(19.0)),
|
scale: (Mm(44.45), Mm(18.75)),
|
||||||
position: (Mm(0.0), Mm(2.5)),
|
position: (Mm(0.0), Mm(2.75)),
|
||||||
}),
|
}),
|
||||||
id_text: Some(TextConfig {
|
id_text: Some(TextConfig {
|
||||||
font_size: 7.0,
|
font_size: 7.0,
|
||||||
|
@ -49,6 +53,10 @@ impl Into<LabelConfig> for LabelPreset {
|
||||||
font_size: 7.0,
|
font_size: 7.0,
|
||||||
position: (Mm(0.0), Mm(0.0)),
|
position: (Mm(0.0), Mm(0.0)),
|
||||||
}),
|
}),
|
||||||
|
branding: Some(TextConfig {
|
||||||
|
font_size: 7.0,
|
||||||
|
position: (Mm(39.5), Mm(0.6)),
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
Self::SeikoSlpMrl => LabelConfig {
|
Self::SeikoSlpMrl => LabelConfig {
|
||||||
width: Mm(44.45),
|
width: Mm(44.45),
|
||||||
|
@ -69,6 +77,10 @@ impl Into<LabelConfig> for LabelPreset {
|
||||||
font_size: 7.0,
|
font_size: 7.0,
|
||||||
position: (Mm(17.0), Mm(0.0)),
|
position: (Mm(17.0), Mm(0.0)),
|
||||||
}),
|
}),
|
||||||
|
branding: Some(TextConfig {
|
||||||
|
font_size: 7.0,
|
||||||
|
position: (Mm(39.5), Mm(0.6)),
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue