#[non_exhaustive]pub struct Style {Show 15 fields
pub color: u32,
pub width: f32,
pub unit: Unit,
pub cap: Cap,
pub join: Join,
pub miter_limit: f32,
pub dash: [f32; 8],
pub dashes: u32,
pub dash_unit: Unit,
pub dash_phase: f32,
pub hatch: [HatchLine; 4],
pub hatches: u32,
pub hatch_width: f32,
pub transparency: Transparency,
pub by_block: u32,
}Expand description
a stroke’s look. Made with new and changed field by field (it may grow)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.color: u320xAARRGGBB: sRGB codes as the target shows them, straight alpha
width: f32in units; 0 (or anything thinner than a pixel): a hairline, 1 px wide
unit: Unit§cap: Cap§join: Join§miter_limit: f32the longest miter over the width (lib/gfx’s and SVG’s ratio); at least 1
dash: [f32; 8]a dash pattern: lengths on and off in turn, starting with on, the first dashes entries (0: solid). An odd count
runs twice (on, off, on, then off, on, off), as in SVG; every dash ends in cap, joins only where a dash runs
through a vertex. The pattern runs along each entity from its start (a closed polyline’s first point, an arc’s
start, a circle’s angle 0), across the joins of a polyline
dashes: u32§dash_unit: Unitthe unit of the pattern’s lengths and of its phase
dash_phase: f32how far into the pattern an entity starts (in dash_units)
hatch: [HatchLine; 4]a fill’s hatch: the first hatches line families (0: the fill is solid), drawn in color over nothing, the lines
hatch_width px wide (0, or thinner than a pixel: 1 px); strokes ignore it
hatches: u32§hatch_width: f32§transparency: TransparencyAutoCAD’s transparency of what the style draws: its layer’s (the default), its block insert’s, or its own; the colour’s alpha times 1 - percent / 100 (G6b2)
by_block: u32inside a block, what an entity of this style takes from its insert’s style instead of its own (BY_BLOCK_COLOR, BY_BLOCK_WIDTH, BY_BLOCK_DASH; DXF’s ByBlock); outside a block the style’s own (G6b2)