pub struct MarkerStyle {
pub geometry: MarkerGeometry,
pub fill: MarkerFill,
pub edge: Option<ShapeStyle>,
}Expand description
Complete validated marker appearance.
Fields§
§geometry: MarkerGeometryOutline and extra rotation.
fill: MarkerFillInterior treatment.
edge: Option<ShapeStyle>Common outer edge, drawn only after fill and dividers.
Implementations§
Source§impl MarkerStyle
impl MarkerStyle
Sourcepub fn empty<S: Into<ShapeStyle>>(
shape: MarkerShape,
edge: S,
) -> Result<Self, MarkerError>
pub fn empty<S: Into<ShapeStyle>>( shape: MarkerShape, edge: S, ) -> Result<Self, MarkerError>
Build an empty contour marker.
Sourcepub fn solid<C: Color, S: Into<ShapeStyle>>(
shape: MarkerShape,
color: C,
edge: S,
) -> Result<Self, MarkerError>
pub fn solid<C: Color, S: Into<ShapeStyle>>( shape: MarkerShape, color: C, edge: S, ) -> Result<Self, MarkerError>
Build an independently filled and edged marker.
Sourcepub fn fact_sage<C: Color>(
shape: MarkerShape,
color: C,
) -> Result<Self, MarkerError>
pub fn fact_sage<C: Color>( shape: MarkerShape, color: C, ) -> Result<Self, MarkerError>
Build a fully filled FactSage-style marker with the same edge and fill colour.
Sourcepub fn partitioned(
shape: MarkerShape,
partition: MarkerPartition,
slices: Vec<MarkerSlice>,
divider: Option<ShapeStyle>,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn partitioned( shape: MarkerShape, partition: MarkerPartition, slices: Vec<MarkerSlice>, divider: Option<ShapeStyle>, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build a partitioned marker through the common validated path.
Sourcepub fn equal_radial<C: Color, I: IntoIterator<Item = C>>(
shape: MarkerShape,
colors: I,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn equal_radial<C: Color, I: IntoIterator<Item = C>>( shape: MarkerShape, colors: I, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build two to four equal radial sectors, beginning at 90 degrees and sweeping clockwise.
Sourcepub fn weighted_radial(
shape: MarkerShape,
start_angle_deg: f64,
direction: SweepDirection,
slices: Vec<MarkerSlice>,
divider: Option<ShapeStyle>,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn weighted_radial( shape: MarkerShape, start_angle_deg: f64, direction: SweepDirection, slices: Vec<MarkerSlice>, divider: Option<ShapeStyle>, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build weighted radial sectors.
Sourcepub fn horizontal<C0: Color, C1: Color>(
shape: MarkerShape,
first: C0,
second: C1,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn horizontal<C0: Color, C1: Color>( shape: MarkerShape, first: C0, second: C1, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build a horizontal two-colour marker (upper first).
Sourcepub fn vertical<C0: Color, C1: Color>(
shape: MarkerShape,
first: C0,
second: C1,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn vertical<C0: Color, C1: Color>( shape: MarkerShape, first: C0, second: C1, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build a vertical two-colour marker (left first).
Sourcepub fn diagonal_forward<C0: Color, C1: Color>(
shape: MarkerShape,
first: C0,
second: C1,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn diagonal_forward<C0: Color, C1: Color>( shape: MarkerShape, first: C0, second: C1, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build a visual / two-colour marker.
Sourcepub fn diagonal_backward<C0: Color, C1: Color>(
shape: MarkerShape,
first: C0,
second: C1,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn diagonal_backward<C0: Color, C1: Color>( shape: MarkerShape, first: C0, second: C1, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build a visual \\ two-colour marker.
Sourcepub fn quadrants<C: Color, I: IntoIterator<Item = C>>(
shape: MarkerShape,
rotation_deg: f64,
colors: I,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn quadrants<C: Color, I: IntoIterator<Item = C>>( shape: MarkerShape, rotation_deg: f64, colors: I, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Build four equal quadrants in upper-right, lower-right, lower-left, upper-left order.
Sourcepub fn new(
geometry: MarkerGeometry,
fill: MarkerFill,
edge: Option<ShapeStyle>,
) -> Result<Self, MarkerError>
pub fn new( geometry: MarkerGeometry, fill: MarkerFill, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>
Construct a fully explicit marker style.
Sourcepub fn validate(&self) -> Result<(), MarkerError>
pub fn validate(&self) -> Result<(), MarkerError>
Validate this style without creating a drawable element.
Sourcepub fn drawing(&self) -> Result<MarkerDrawing, MarkerError>
pub fn drawing(&self) -> Result<MarkerDrawing, MarkerError>
Prepare the shared backend-neutral draw plan.