FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PolarScaler

    struct · ferroui-livecharts · v0.5.0

    struct PolarScaler
    

    View source

    Members

    center

    center: ferroui_base::Point
    

    Source

    min_radius

    min_radius: f64
    

    Source

    max_radius

    max_radius: f64
    

    Source

    min_angle

    min_angle: f64
    

    Source

    max_angle

    max_angle: f64
    

    Source

    inner_radius

    inner_radius: f64
    

    Source

    new

    fn new(plot: Rect, options: PolarScaleOptions) -> Result<Self, ScaleError>
    

    Source

    get_angle

    fn get_angle(self: Self, angle: f64) -> f64
    

    Source-compatible angle convention: angle values are measured from zero; the bounds set the angular interval length, not its angular origin.

    Source

    to_pixels

    fn to_pixels(self: Self, angle: f64, radius: f64) -> Point
    

    Source

    to_pixels_with_angle_in_degrees

    fn to_pixels_with_angle_in_degrees(self: Self, angle: f64, radius: f64) -> Point
    

    Source

    to_chart_values

    fn to_chart_values(self: Self, point: Point) -> Point
    

    Inverse of to_pixels, using atan2 so axes and every quadrant work. Values are normalized to one revolution starting at the initial rotation. This corrects the upstream inverse's division by zero and extra MinAngle.

    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
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq

    Availability

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