FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MapProjector

    enum · ferroui-livecharts · v0.5.0

    enum MapProjector
    

    A projector built for one map area (MapProjector): the source's abstract class is the enum of its three projections. Screen positions are f64 where the source uses float.

    View source

    Members

    Default

    Default(super::ControlCoordinatesProjector)
    

    Source

    Mercator

    Mercator(super::MercatorProjector)
    

    Source

    Orthographic

    Orthographic(super::OrthographicProjector)
    

    Source

    map_width

    fn map_width(self: &Self) -> f64
    

    The width of the map area.

    Source

    map_height

    fn map_height(self: &Self) -> f64
    

    The height of the map area.

    Source

    x_offset

    fn x_offset(self: &Self) -> f64
    

    The left of the map area.

    Source

    y_offset

    fn y_offset(self: &Self) -> f64
    

    The top of the map area.

    Source

    map_rect

    fn map_rect(self: &Self) -> ferroui_base::Rect
    

    The map area, which the chart clips the lands to.

    Source

    to_map

    fn to_map(self: &Self, longitude: f64, latitude: f64) -> Point
    

    Projects a longitude and latitude, in degrees, to the screen (ToMap).

    Source

    is_visible

    fn is_visible(self: &Self, longitude: f64, latitude: f64) -> bool
    

    Whether the coordinate is on the visible side of the projection (IsVisible); always true for the flat projections.

    Source

    to_coordinates

    fn to_coordinates(self: &Self, screen: Point) -> Option<(f64, f64)>
    

    The inverse of Self::to_map (ToCoordinates): the longitude and latitude of a screen position, None where the projection has none (outside the disc of a globe).

    Source

    as_orthographic

    fn as_orthographic(self: &Self) -> Option<&OrthographicProjector>
    

    The globe of an orthographic projector.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.