fix(render): keep a cursor parked on an axis bound inside and visible
This commit is contained in:
1 parent
eb7371d7a5
commit
93ad774281
3 files changed
+84
-18
No files matched your search
@@ -455,8 +455,13 @@ class Renderer {
|
||||
/// The cursors, both orientations: one stroke per cursor, placed at the coordinate its own
|
||||
/// orientation owns (`Plot::cursor_screen_coordinate()`) and spanning the other axis' whole
|
||||
/// range, in its own colour -- or in the accent at handle width while it is hovered or
|
||||
/// grabbed, which is the same cue a region's hot bound gets. A cursor at the far edge of
|
||||
/// its range is skipped rather than drawn as half a stroke over the strip beside it.
|
||||
/// grabbed, which is the same cue a region's hot bound gets. A cursor more than half a
|
||||
/// stroke outside its range's mapped span (a marker scrolled past the right edge, a ruler
|
||||
/// past the bottom) is skipped; one on or within half a stroke of a bound is drawn, with
|
||||
/// its stroke centre held half a stroke inside the rect -- so a marker parked on an edge
|
||||
/// stays visible there instead of losing its outside half, and the inside sliver of it, to
|
||||
/// the clip, and a range maximum that undershoots the edge by a ulp is not mistaken for
|
||||
/// off the plot.
|
||||
void draw_cursors(const Plot& plot, const PlotLayout& layout);
|
||||
/// One cursor's label: the caller's caption for either orientation, and for a horizontal
|
||||
/// ruler the value itself, written in its y axis' own tick format (`Axis::format_value()`)
|
||||
|
||||
Reference in new issue
Block a user