pub struct EntityCommon {Show 19 fields
pub handle: Handle,
pub layer: String,
pub color: Color,
pub line_weight: LineWeight,
pub linetype: String,
pub linetype_scale: f64,
pub transparency: Transparency,
pub invisible: bool,
pub extended_data: ExtendedData,
pub graphic_data: Option<Vec<u8>>,
pub reactors: Vec<Handle>,
pub xdictionary_handle: Option<Handle>,
pub owner_handle: Handle,
pub material_flags: u8,
pub material_handle: Option<Handle>,
pub shadow_flags: u8,
pub plotstyle_flags: u8,
pub plotstyle_handle: Option<Handle>,
pub entity_mode: Option<u8>,
}Expand description
Common entity data shared by all entities
Fields§
§handle: HandleUnique handle
layer: StringLayer name
color: ColorColor
line_weight: LineWeightLine weight
linetype: StringLinetype name (empty string = “ByLayer”)
linetype_scale: f64Linetype scale factor (default 1.0)
transparency: TransparencyTransparency
invisible: boolVisibility flag
extended_data: ExtendedDataExtended data (XDATA)
graphic_data: Option<Vec<u8>>Raw entity graphic data bytes (stored for DWG round-trip; None otherwise).
reactors: Vec<Handle>Reactor handles — objects attached as reactors ({ACAD_REACTORS})
xdictionary_handle: Option<Handle>Extended dictionary handle ({ACAD_XDICTIONARY}) — hard-owner handle to a Dictionary
owner_handle: HandleOwner handle (soft pointer, code 330)
material_flags: u8Material flags (BB: 00=bylayer, 01=byblock, 10=reserved, 11=handle) — R2007+
material_handle: Option<Handle>Material handle (only valid when material_flags == 0b11) — R2007+
shadow_flags: u8Shadow flags (RC) — R2007+
plotstyle_flags: u8Plotstyle flags (BB: 00=bylayer, 01=byblock, 10=reserved, 11=handle) — R2000+
plotstyle_handle: Option<Handle>Plotstyle handle (only valid when plotstyle_flags == 0b11) — R2000+
entity_mode: Option<u8>Entity mode (0=owned, 1=paper, 2=model) — raw DWG value for round-trip
Implementations§
Source§impl EntityCommon
impl EntityCommon
Sourcepub fn with_layer(layer: impl Into<String>) -> Self
pub fn with_layer(layer: impl Into<String>) -> Self
Create with a specific layer
Sourcepub fn has_linetype(&self) -> bool
pub fn has_linetype(&self) -> bool
Check whether a linetype name is set (not empty and not “ByLayer”)
Trait Implementations§
Source§impl Clone for EntityCommon
impl Clone for EntityCommon
Source§fn clone(&self) -> EntityCommon
fn clone(&self) -> EntityCommon
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more