mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
PDF import and export: rustfmt
This commit is contained in:
@@ -154,7 +154,10 @@ pub(crate) fn warnings(set: &PdfSettings) -> Vec<String> {
|
||||
out.push(format!("{} encryption covers the metadata too: plaintext metadata needs PDF 1.5 or later", set.compatibility.label()));
|
||||
}
|
||||
if s.protected() && set.compatibility == Compatibility::Pdf13 {
|
||||
out.push(format!("{} encrypts with a 40-bit key, which can be searched in minutes: choose PDF 1.6 or later for stronger protection", set.compatibility.label()));
|
||||
out.push(format!(
|
||||
"{} encrypts with a 40-bit key, which can be searched in minutes: choose PDF 1.6 or later for stronger protection",
|
||||
set.compatibility.label()
|
||||
));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
@@ -987,7 +987,11 @@ fn stroke_layer(paint: Paint, opacity: f32, p: &StrokeProps, scale: f64) -> Stro
|
||||
};
|
||||
st.miter_limit = p.miter_limit as f64;
|
||||
// (Every stroke keeps its own copy: a dash array has a few entries, and one with thousands is cut.)
|
||||
let dash = Dash { pattern: p.dash_array.iter().take(MAX_DASH_ENTRIES).map(|v| *v as f64 * scale).collect(), offset: p.dash_offset as f64 * scale, align_corners: false };
|
||||
let dash = Dash {
|
||||
pattern: p.dash_array.iter().take(MAX_DASH_ENTRIES).map(|v| *v as f64 * scale).collect(),
|
||||
offset: p.dash_offset as f64 * scale,
|
||||
align_corners: false,
|
||||
};
|
||||
// An invalid dash array (a negative value, or all zeros) strokes solid.
|
||||
st.dash = dash.is_dashed().then_some(dash);
|
||||
st
|
||||
|
||||
Reference in New Issue
Block a user