Skip to main content

MarkerStyle

Struct MarkerStyle 

Source
pub struct MarkerStyle {
    pub geometry: MarkerGeometry,
    pub fill: MarkerFill,
    pub edge: Option<ShapeStyle>,
}
Expand description

Complete validated marker appearance.

Fields§

§geometry: MarkerGeometry

Outline and extra rotation.

§fill: MarkerFill

Interior treatment.

§edge: Option<ShapeStyle>

Common outer edge, drawn only after fill and dividers.

Implementations§

Source§

impl MarkerStyle

Source

pub fn empty<S: Into<ShapeStyle>>( shape: MarkerShape, edge: S, ) -> Result<Self, MarkerError>

Build an empty contour marker.

Source

pub fn solid<C: Color, S: Into<ShapeStyle>>( shape: MarkerShape, color: C, edge: S, ) -> Result<Self, MarkerError>

Build an independently filled and edged marker.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

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).

Source

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.

Source

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.

Source

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.

Source

pub fn new( geometry: MarkerGeometry, fill: MarkerFill, edge: Option<ShapeStyle>, ) -> Result<Self, MarkerError>

Construct a fully explicit marker style.

Source

pub fn validate(&self) -> Result<(), MarkerError>

Validate this style without creating a drawable element.

Source

pub fn drawing(&self) -> Result<MarkerDrawing, MarkerError>

Prepare the shared backend-neutral draw plan.

Source

pub fn scaled(&self, factor: u32) -> Self

Scale only edge and divider widths for a high-resolution bitmap pass.

Trait Implementations§

Source§

impl Clone for MarkerStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MarkerStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for MarkerStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MarkerStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.