pub struct ContourLabelAnchor {
pub level_index: u32,
pub x: f64,
pub y: f64,
pub tx: f64,
pub ty: f64,
}Expand description
One label placement, in data space.
Data coordinates and a data-space tangent, not screen values: the draw re-projects them, so the same record works whether the GPU projected it from the implicit field or a host wrote it by hand. The screen angle is this tangent projected through the current transform — exact on a linear axis, the local direction on a logarithmic one.
Fields§
§level_index: u32Index into ContourConfig::levels.
x: f64§y: f64§tx: f64Tangent direction in data space; the label’s screen angle is this projected through the current transform.
ty: f64Trait Implementations§
Source§impl Clone for ContourLabelAnchor
impl Clone for ContourLabelAnchor
Source§impl Debug for ContourLabelAnchor
impl Debug for ContourLabelAnchor
Source§impl<'de> Deserialize<'de> for ContourLabelAnchor
impl<'de> Deserialize<'de> for ContourLabelAnchor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ContourLabelAnchor
impl PartialEq for ContourLabelAnchor
Source§impl Serialize for ContourLabelAnchor
impl Serialize for ContourLabelAnchor
impl StructuralPartialEq for ContourLabelAnchor
Auto Trait Implementations§
impl Freeze for ContourLabelAnchor
impl RefUnwindSafe for ContourLabelAnchor
impl Send for ContourLabelAnchor
impl Sync for ContourLabelAnchor
impl Unpin for ContourLabelAnchor
impl UnsafeUnpin for ContourLabelAnchor
impl UnwindSafe for ContourLabelAnchor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more