Enum aoer_plotty_rs::geo_types::svg::Arrangement
source · [−]pub enum Arrangement<T>where
T: Real,
T: CoordNum,
T: RealField,{
Center(Rect<T>, bool),
FitCenter(Rect<T>, bool),
FitCenterMargin(T, Rect<T>, bool),
Transform(Rect<T>, Affine2<T>),
}
Expand description
An arrangement is a plan for transformation of an SVG
Variants
Center(Rect<T>, bool)
FitCenter(Rect<T>, bool)
FitCenterMargin(T, Rect<T>, bool)
Transform(Rect<T>, Affine2<T>)
Implementations
sourceimpl<T: RealField + Float> Arrangement<T>
impl<T: RealField + Float> Arrangement<T>
sourcepub fn finalize(&self, geo_bounds: &Rect<T>) -> Arrangement<T>
pub fn finalize(&self, geo_bounds: &Rect<T>) -> Arrangement<T>
Generates a final Arrangement in the form of an Arrangement::Transform
which can be
use to consistently generate an SVG.
pub fn viewbox(&self) -> Rect<T>
pub fn affine(&self, geo_bounds: &Rect<T>) -> Affine2<T>
pub fn unit(window: &Rect<T>) -> Arrangement<T>
pub fn create_svg_document(&self) -> Result<Document, SvgCreationError>where
T: Real,
T: CoordNum,
T: RealField,
T: ToPrimitive,
T: FromPrimitive,
f64: From<T>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Arrangement<T>where
T: RefUnwindSafe,
impl<T> Send for Arrangement<T>
impl<T> Sync for Arrangement<T>
impl<T> Unpin for Arrangement<T>where
T: Unpin,
impl<T> UnwindSafe for Arrangement<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default Read more
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
sourcefn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourcefn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourcefn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read moreimpl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.