Better doc string, use `Viz.vs: ViewState`
parent
d3c85bc925
commit
f8727251f9
|
@ -51,7 +51,20 @@ log = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Renderer(msgspec.Struct):
|
class Renderer(msgspec.Struct):
|
||||||
|
'''
|
||||||
|
Low(er) level interface for converting a source, real-time updated,
|
||||||
|
data buffer (usually held in a ``ShmArray``) to a graphics data
|
||||||
|
format usable by `Qt`.
|
||||||
|
|
||||||
|
A renderer reads in context-specific source data using a ``Viz``,
|
||||||
|
formats that data to a 2D-xy pre-graphics format using
|
||||||
|
a ``IncrementalFormatter``, then renders that data to a set of
|
||||||
|
output graphics objects normally a ``.ui._curve.FlowGraphics``
|
||||||
|
sub-type to which the ``Renderer.path`` is applied and further "last
|
||||||
|
datum" graphics are updated from the source buffer's latest
|
||||||
|
sample(s).
|
||||||
|
|
||||||
|
'''
|
||||||
viz: Viz
|
viz: Viz
|
||||||
fmtr: IncrementalFormatter
|
fmtr: IncrementalFormatter
|
||||||
|
|
||||||
|
@ -195,7 +208,7 @@ class Renderer(msgspec.Struct):
|
||||||
fast_path: QPainterPath = self.fast_path
|
fast_path: QPainterPath = self.fast_path
|
||||||
reset: bool = False
|
reset: bool = False
|
||||||
|
|
||||||
self.viz.yrange = None
|
self.viz.ds_yrange = None
|
||||||
|
|
||||||
# redraw the entire source data if we have either of:
|
# redraw the entire source data if we have either of:
|
||||||
# - no prior path graphic rendered or,
|
# - no prior path graphic rendered or,
|
||||||
|
@ -218,7 +231,7 @@ class Renderer(msgspec.Struct):
|
||||||
)
|
)
|
||||||
if ds_out is not None:
|
if ds_out is not None:
|
||||||
x_1d, y_1d, ymn, ymx = ds_out
|
x_1d, y_1d, ymn, ymx = ds_out
|
||||||
self.viz.yrange = ymn, ymx
|
self.viz.ds_yrange = ymn, ymx
|
||||||
# print(f'{self.viz.name} post ds: ymn, ymx: {ymn},{ymx}')
|
# print(f'{self.viz.name} post ds: ymn, ymx: {ymn},{ymx}')
|
||||||
|
|
||||||
reset = True
|
reset = True
|
||||||
|
|
Loading…
Reference in New Issue