mirror of
https://github.com/storytold/designcraft.git
synced 2026-12-02 20:21:15 -05:00
rustfmt the dashed-stroke port after merging main
This commit is contained in:
1 parent
51548b5589
commit
fb0c111b3e
2 files changed
+2
-6
No files matched your search
@@ -732,4 +732,3 @@ fn encode_png(rgba: Vec<u8>, w: u32, h: u32) -> Option<Vec<u8>> {
|
||||
let image = craft_image_codecs::Image::from_u8(w, h, craft_image_codecs::ChannelLayout::Rgba, rgba).ok()?;
|
||||
craft_image_codecs::encode(&image, craft_image_codecs::Format::Png, &Default::default()).ok()
|
||||
}
|
||||
|
||||
@@ -93,11 +93,8 @@ fn model_border(ex: &Exporter, s: Option<&StrokeSeg>, k: f64, opacity: f32) -> c
|
||||
if pattern.len() % 2 == 1 {
|
||||
pattern.extend(pattern.clone());
|
||||
}
|
||||
let pairs = pattern
|
||||
.chunks(2)
|
||||
.filter_map(|pair| pair.first().zip(pair.get(1)))
|
||||
.map(|(dash, gap)| (*dash / st.weight, *gap / st.weight))
|
||||
.collect();
|
||||
let pairs =
|
||||
pattern.chunks(2).filter_map(|pair| pair.first().zip(pair.get(1))).map(|(dash, gap)| (*dash / st.weight, *gap / st.weight)).collect();
|
||||
Some(craft_pptx::style::Dash::Custom { pattern: pairs })
|
||||
} else if matches!(st.kind, StrokeType::Dotted) {
|
||||
Some(craft_pptx::style::Dash::Preset { name: "sysDot".into() })
|
||||
|
||||
Reference in new issue
Block a user