pub struct Drawing {
pub page: P,
pub layers: Vec<Layer>,
pub link: Option<[f64; 4]>,
pub text: Vec<TextRun>,
pub annotations: Vec<Annotation>,
pub sheet: Sheet,
pub problems: Vec<Problem>,
pub spec: Option<String>,
}Fields§
§page: PPage width and height, mm.
layers: Vec<Layer>§link: Option<[f64; 4]>The attribution link’s rectangle (x0, y0, x1, y1), mm.
text: Vec<TextRun>§annotations: Vec<Annotation>The annotations drawn, with what each states. Written to no file format.
sheet: SheetThe views and things drawn, for lint’s sheet checks. Written to no file format.
problems: Vec<Problem>What could not be drawn as planned (undrawn). Written to no file format.
spec: Option<String>The spec the drawing was made from (JSON), carried in the SVG’s metadata, the DXF’s opening comments and the PDF’s document information so the drawing can be resumed from the file alone.
Implementations§
Source§impl Drawing
impl Drawing
Sourcepub fn svg(&self) -> String
pub fn svg(&self) -> String
The SVG: a page in millimetres, y up inside a flipping group, one group per layer, then the labels’ text, invisible.
Sourcepub fn dxf(&self) -> Vec<u8> ⓘ
pub fn dxf(&self) -> Vec<u8> ⓘ
An editable R2013 DXF in millimetres at sheet size in model space.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Drawing
impl Freeze for Drawing
impl Move for Drawing
impl RefUnwindSafe for Drawing
impl Send for Drawing
impl Sync for Drawing
impl Unpin for Drawing
impl UnsafeUnpin for Drawing
impl UnwindSafe for Drawing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more