fix(render): convert Trace::width through the UI scale, and fold the controller's tolerance conversion into Style::device()
This commit is contained in:
1 parent
7500fc90d2
commit
69495a3799
7 files changed
+158
-24
No files matched your search
@@ -11,6 +11,9 @@ namespace plot {
|
||||
struct TraceDesc {
|
||||
const data::Series* series = nullptr;
|
||||
Color color = Color::hex(0x4FA3FF);
|
||||
/// The stroke's width in **logical** pixels, like every stroke in `Style` (see
|
||||
/// that struct's unit rule): the renderer converts it once, so a trace has the
|
||||
/// same weight against the axis lines whatever the display's DPI.
|
||||
f32 width = 1.5f;
|
||||
u32 axis_x = 0, axis_y = 0;
|
||||
/// What the trace is called, for the legend. Empty means "do not list it", which
|
||||
@@ -28,6 +31,8 @@ struct TraceDesc {
|
||||
struct Trace {
|
||||
const data::Series* series = nullptr;
|
||||
Color color = Color::hex(0x4FA3FF);
|
||||
/// Logical pixels, as in `TraceDesc::width`: converted to device pixels by the
|
||||
/// renderer's one `Style::device()` call per stroke.
|
||||
f32 width = 1.5f;
|
||||
u32 axis_x = 0, axis_y = 0;
|
||||
/// The legend's entry for this trace, empty when it has none. A name does not
|
||||
|
||||
Reference in new issue
Block a user