.controllers._ui.Display

class controllers._ui.display.Display(view: PySimpleGUI.PySimpleGUI.Window, gif_frames: controllers._gif.frames.Frames)

Controller responsible for drawing GIF frames and user selections into a given PySimpleGUI Window.

Initializer

controllers._ui.Display.__init__(self, view: PySimpleGUI.PySimpleGUI.Window, gif_frames: controllers._gif.frames.Frames)

Initializes a new Display object.

Parameters
  • view (sg.Window) – PySimpleGUI Window to control

  • gif_frames (controllers._ui.Frames) – Object containing GIF frames


Location

/controllers/_ui/display.py

Instance functions

controllers._ui.Display.draw_gif_frame(self, index: int) None

Displays a GIF frame according to index value

Parameters

index (int) – Current frame number


controllers._ui.Display.draw_selection(self, selection: model.selection.Selection) None

Draws a given user selection over the display

Parameters

selection (model.Selection) – Object that holds user selection


Internal instance functions

controllers._ui.Display._draw_start(self, selection: model.selection.Selection) None

Draws a dot over the display representing the beginning of user selection.

Parameters

selection (model.Selection) – Object that holds user selection


controllers._ui.Display._draw_box(self, selection: model.selection.Selection) None

Draws a box over the display representing user selected crop area.

Parameters

selection (model.Selection) – Object that holds user selection


Source code (on GitHub)