Commit 82108596 authored by Alexandru Băluț's avatar Alexandru Băluț

viewer: Set start point for drawing rectangle

parent 45a940cc
......@@ -430,9 +430,9 @@ class MoveScaleOverlay(Overlay):
self.handles[(Edge.top,)].set_position(self.handles[(Edge.top, Edge.right)].position - half_w)
def __draw_rectangle(self, cr):
cr.move_to(*self.handles[(Edge.top, Edge.right)].get_window_position())
for handle in self.corner_handles.values():
cr.line_to(*handle.get_window_position())
cr.line_to(*self.handles[(Edge.top, Edge.left)].get_window_position())
def get_center(self):
diagonal = self.handles[(Edge.bottom, Edge.right)].position - self.handles[(Edge.top, Edge.left)].position
......
......@@ -43,9 +43,9 @@ class TitleOverlay(Overlay):
self.update_from_source()
def __draw_rectangle(self, cr):
cr.move_to(*self.__corners[-1])
for corner in self.__corners:
cr.line_to(*corner.tolist())
cr.line_to(*self.__position.tolist())
def __get_source_position(self):
res_x, x = self._source.get_child_property("x-absolute")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment