Struct dxf::Drawing
[−]
[src]
pub struct Drawing { pub header: Header, pub entities: Vec<Entity>, 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>, }
Represents a DXF drawing.
Fields
header: Header
The drawing's header. Contains various drawing-specific values and settings.
entities: Vec<Entity>
The entities 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.
Methods
impl Drawing
[src]
fn new() -> Self
Creates a new empty Drawing
.
fn load<T>(reader: T) -> DxfResult<Drawing> where 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
Writes a Drawing
to anything that implements the Write
trait.
fn save_file(&self, file_name: &str) -> DxfResult<()>
Writes a Drawing
to disk, using a BufWriter
.