Struct dxf::Drawing
[−]
[src]
pub struct Drawing { pub header: Header, pub classes: Vec<Class>, pub app_ids: Vec<AppId>, pub block_records: Vec<BlockRecord>, pub dim_styles: Vec<DimStyle>, pub layers: Vec<Layer>, pub line_types: Vec<LineType>, pub styles: Vec<Style>, pub ucs: Vec<Ucs>, pub views: Vec<View>, pub view_ports: Vec<ViewPort>, pub blocks: Vec<Block>, pub entities: Vec<Entity>, pub objects: Vec<Object>, pub thumbnail: Option<Vec<u8>>, }
Represents a DXF drawing.
Fields
header: Header
The drawing's header. Contains various drawing-specific values and settings.
classes: Vec<Class>
The classes contained by the drawing.
app_ids: Vec<AppId>
The AppIds contained by the drawing.
block_records: Vec<BlockRecord>
The block records contained by the drawing.
dim_styles: Vec<DimStyle>
The dimension styles contained by the drawing.
layers: Vec<Layer>
The layers contained by the drawing.
line_types: Vec<LineType>
The line types contained by the drawing.
styles: Vec<Style>
The visual styles contained by the drawing.
ucs: Vec<Ucs>
The user coordinate systems (UCS) contained by the drawing.
views: Vec<View>
The views contained by the drawing.
view_ports: Vec<ViewPort>
The view ports contained by the drawing.
blocks: Vec<Block>
The blocks contained by the drawing.
entities: Vec<Entity>
The entities contained by the drawing.
objects: Vec<Object>
The objects contained by the drawing.
thumbnail: Option<Vec<u8>>
The thumbnail image preview of the drawing.
Methods
impl Drawing
[src]
fn load<T>(reader: &mut T) -> DxfResult<Drawing> where
T: Read,
T: Read,
Loads a Drawing
from anything that implements the Read
trait.
fn load_file(file_name: &str) -> DxfResult<Drawing>
Loads a Drawing
from disk, using a BufReader
.
fn save<T>(&self, writer: &mut T) -> DxfResult<()> where
T: Write,
T: Write,
Writes a Drawing
to anything that implements the Write
trait.
fn save_binary<T>(&self, writer: &mut T) -> DxfResult<()> where
T: Write,
T: Write,
Writes a Drawing
as binary to anything that implements the Write
trait.
fn save_file(&self, file_name: &str) -> DxfResult<()>
Writes a Drawing
to disk, using a BufWriter
.
fn save_file_binary(&self, file_name: &str) -> DxfResult<()>
Writes a Drawing
as binary to disk, using a BufWriter
.
fn save_dxb<T>(&self, writer: &mut T) -> DxfResult<()> where
T: Write,
T: Write,
Writes a Drawing
as DXB to anything that implements the Write
trait.
fn save_file_dxb(&self, file_name: &str) -> DxfResult<()>
Writes a Drawing
as DXB to disk, using a BufWriter
.
fn clear(&mut self)
Clears all items from the Drawing
.
fn normalize(&mut self)
Normalizes the Drawing
by ensuring expected items are present.