mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
Load ROI from config.roi_window
This commit is contained in:
parent
8eae8d89d3
commit
3641751a22
@ -551,7 +551,17 @@ class CameraWidget:
|
|||||||
item = spawn_item(color)
|
item = spawn_item(color)
|
||||||
graph._TKCanvas2.itemconfig(item, dash=(pixel_duty, 8 - pixel_duty), dashoffset=dashoffset)
|
graph._TKCanvas2.itemconfig(item, dash=(pixel_duty, 8 - pixel_duty), dashoffset=dashoffset)
|
||||||
|
|
||||||
if None not in (self.x0, self.y0, self.x1, self.y1):
|
if None in (self.x0, self.y0, self.x1, self.y1):
|
||||||
|
# roi_window rotates around roi center, we rotate around image center
|
||||||
|
# TODO: it would be nice if they were more consistent
|
||||||
|
self.x0 = self.config.roi_window_x + self.pad_left
|
||||||
|
self.y0 = self.config.roi_window_y + self.pad_top
|
||||||
|
self.x1 = self.x0 + self.config.roi_window_w
|
||||||
|
self.y1 = self.y0 + self.config.roi_window_h
|
||||||
|
self._cartesian_to_polar()
|
||||||
|
self.ca += math.radians(self.config.rotation_angle)
|
||||||
|
self._polar_to_cartesian()
|
||||||
|
|
||||||
style = {}
|
style = {}
|
||||||
if self.is_mouse_up:
|
if self.is_mouse_up:
|
||||||
style = {"dark": "#7f78ff", "light": "#d002ff", "duty": 0.5}
|
style = {"dark": "#7f78ff", "light": "#d002ff", "duty": 0.5}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user