Drop all (old) unused state instance vars
							parent
							
								
									6f00617bd3
								
							
						
					
					
						commit
						3ab91deaec
					
				|  | @ -84,8 +84,6 @@ class FastAppendCurve(pg.GraphicsObject): | |||
|         # brutaaalll, see comments within.. | ||||
|         self.yData = None | ||||
|         self.xData = None | ||||
|         # self._vr: Optional[tuple] = None | ||||
|         # self._avr: Optional[tuple] = None | ||||
|         self._last_cap: int = 0 | ||||
| 
 | ||||
|         self._name = name | ||||
|  | @ -98,14 +96,6 @@ class FastAppendCurve(pg.GraphicsObject): | |||
|         # we're basically only using the pen setting now... | ||||
|         super().__init__(*args, **kwargs) | ||||
| 
 | ||||
|         # self._xrange: tuple[int, int] = self.dataBounds(ax=0) | ||||
|         # self._xrange: Optional[tuple[int, int]] = None | ||||
|         # self._x_iv_range = None | ||||
| 
 | ||||
|         # self._last_draw = time.time() | ||||
|         # self._in_ds: bool = False | ||||
|         # self._last_uppx: float = 0 | ||||
| 
 | ||||
|         # all history of curve is drawn in single px thickness | ||||
|         pen = pg.mkPen(hcolor(color)) | ||||
|         pen.setStyle(_line_styles[style]) | ||||
|  | @ -162,9 +152,6 @@ class FastAppendCurve(pg.GraphicsObject): | |||
|         vr = self.viewRect() | ||||
|         l, r = int(vr.left()), int(vr.right()) | ||||
| 
 | ||||
|         # if not self._xrange: | ||||
|         #     return 0 | ||||
| 
 | ||||
|         start, stop = self._xrange | ||||
|         lbar = max(l, start) | ||||
|         rbar = min(r, stop) | ||||
|  |  | |||
|  | @ -358,20 +358,10 @@ class Flow(msgspec.Struct):  # , frozen=True): | |||
|     is_ohlc: bool = False | ||||
|     render: bool = True  # toggle for display loop | ||||
| 
 | ||||
|     # pre-graphics formatted data | ||||
|     gy: Optional[np.ndarray] = None | ||||
|     gx: Optional[np.ndarray] = None | ||||
| 
 | ||||
|     # pre-graphics update indices | ||||
|     _iflat_last: int = 0 | ||||
|     _iflat_first: int = 0 | ||||
| 
 | ||||
|     # downsampling state | ||||
|     _last_uppx: float = 0 | ||||
|     _in_ds: bool = False | ||||
| 
 | ||||
|     _graphics_tranform_fn: Optional[Callable[ShmArray, np.ndarray]] = None | ||||
| 
 | ||||
|     # map from uppx -> (downsampled data, incremental graphics) | ||||
|     _src_r: Optional[Renderer] = None | ||||
|     _render_table: dict[ | ||||
|  | @ -717,6 +707,8 @@ class Flow(msgspec.Struct):  # , frozen=True): | |||
| 
 | ||||
|             else: | ||||
|                 w = 0.5 | ||||
|                 # lol, commenting this makes step curves | ||||
|                 # all "black" for me :eyeroll:.. | ||||
|                 graphics._last_line = QLineF( | ||||
|                     x_last - w, 0, | ||||
|                     x_last + w, 0, | ||||
|  |  | |||
|  | @ -129,11 +129,7 @@ class BarItems(pg.GraphicsObject): | |||
|         self.fast_path = QtGui.QPainterPath() | ||||
| 
 | ||||
|         self._xrange: tuple[int, int] | ||||
|         # self._yrange: tuple[float, float] | ||||
|         self._vrange = None | ||||
| 
 | ||||
|         # TODO: don't render the full backing array each time | ||||
|         # self._path_data = None | ||||
|         self._last_bar_lines: Optional[tuple[QLineF, ...]] = None | ||||
| 
 | ||||
|         # track the current length of drawable lines within the larger array | ||||
|  | @ -212,16 +208,6 @@ class BarItems(pg.GraphicsObject): | |||
|             hb.bottomRight(), | ||||
|         ) | ||||
| 
 | ||||
|         # fp = self.fast_path | ||||
|         # if fp: | ||||
|         #     fhb = fp.controlPointRect() | ||||
|         #     print((hb_tl, hb_br)) | ||||
|         #     print(fhb) | ||||
|         #     hb_tl, hb_br = ( | ||||
|         #         fhb.topLeft() + hb.topLeft(), | ||||
|         #         fhb.bottomRight() + hb.bottomRight(), | ||||
|         #     ) | ||||
| 
 | ||||
|         # need to include last bar height or BR will be off | ||||
|         mx_y = hb_br.y() | ||||
|         mn_y = hb_tl.y() | ||||
|  | @ -281,7 +267,3 @@ class BarItems(pg.GraphicsObject): | |||
|         p.setPen(self.bars_pen) | ||||
|         p.drawPath(self.path) | ||||
|         profiler(f'draw history path: {self.path.capacity()}') | ||||
| 
 | ||||
|         # if self.fast_path: | ||||
|         #     p.drawPath(self.fast_path) | ||||
|         #     profiler('draw fast path') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue