Create an external Iced element anchored at a plot position. The position is interpreted as normal data coordinates by default. Use [`PlotOverlay::with_axes_transform`] or [`PlotOverlay::with_transform`] for other coordinate systems.
(element: impl Into<Element<'a, Message>>, anchor_position: [f64; 2])
| 28 | /// [`PlotOverlay::with_axes_transform`] or [`PlotOverlay::with_transform`] for other |
| 29 | /// coordinate systems. |
| 30 | pub fn new(element: impl Into<Element<'a, Message>>, anchor_position: [f64; 2]) -> Self { |
| 31 | Self { |
| 32 | element: element.into(), |
| 33 | anchor_position, |
| 34 | anchor_position_transform: PositionTransform::identity(), |
| 35 | anchor_offset: [0.0, 0.0], |
| 36 | align_to_anchor_vertical: Vertical::Center, |
| 37 | align_to_anchor_horizontal: Horizontal::Center, |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | /// Set the plot position (in `[x,y]` coordinates) used as the overlay anchor. |
| 42 | pub fn with_anchor_position(mut self, anchor_position: [f64; 2]) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected