MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / tooltip_anchor_world

Method tooltip_anchor_world

src/plot_widget.rs:384–393  ·  view source on GitHub ↗

Compute the world-space anchor point for a tooltip. For pixel-sized markers (or no markers), this is the point's (x, y). For world-sized square markers, the marker is effectively bottom-left anchored, so we anchor the tooltip at the marker's center (x + size/2, y + size/2).

(point: &HighlightPoint)

Source from the content-addressed store, hash-verified

382 None
383 }
384 }
385
386 fn world_to_screen_position_unclipped(
387 world: [f64; 2],
388 camera_bounds: &(Camera, Rectangle),
389 x_axis_scale: AxisScale,
390 y_axis_scale: AxisScale,
391 transform: &PositionTransform,
392 ) -> Option<[f32; 2]> {
393 let (camera, bounds) = camera_bounds;
394 let world = data_point_to_plot_with_transform(
395 world,
396 x_axis_scale,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected