jguvc_eip.image_objects

Classes

  • ImageObject: Helper class that provides a standard way to create an ABC using

  • Rectangle: This class represents/draws a rectangle with specified width and height.

  • Circle: This class represents/draws a circle with specified radius

  • Ellipse: This class represents/draws an ellipse with axis-aligned diameters “width” and “height”

  • Polygon: This class represents/draws a polygon consisting of a list of points.

  • Text: This class represents/draws text specified by a string.

  • VerticalStack: This class stores a list of image objects that are stacked vertically on top of each other

  • HorizontalStack: This class stores a list of image objects that are stacked horizontally next to each other

  • Overlay: This class stores a list of image objects drawn over each other. The first object in the list is drawn

  • Translate: This class is a container that translates (shifts in space) the position of the contained object.

  • Scale: This class is a container that scales the contained object (changes its size by a factor)

  • Rotate: This class is a container that rotates the contained object counterclockwise

class jguvc_eip.image_objects.ImageObject

Inheritance

Inheritance diagram of ImageObject
abstract draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

abstract get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

abstract get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Rectangle(width, height, fill_color=(0, 0, 0), border_color=(0, 0, 0), border_thickness=1)

This class represents/draws a rectangle with specified width and height. The shape is drawn within a bounding box of [0,width] x [0,height].

Inheritance

Inheritance diagram of Rectangle
Parameters
  • width (int) –

  • height (int) –

  • fill_color (Optional[Tuple[int, int, int]]) –

  • border_color (Optional[Tuple[int, int, int]]) –

  • border_thickness (int) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Circle(radius, fill_color=(0, 0, 0), border_color=(0, 0, 0), border_thickness=1)

This class represents/draws a circle with specified radius The shape is drawn within a bounding box of [0,2*radius] x [0,2*radius].

Inheritance

Inheritance diagram of Circle
Parameters
  • radius (int) –

  • fill_color (Optional[Tuple[int, int, int]]) –

  • border_color (Optional[Tuple[int, int, int]]) –

  • border_thickness (int) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Ellipse(width, height, fill_color=(0, 0, 0), border_color=(0, 0, 0), border_thickness=1)

This class represents/draws an ellipse with axis-aligned diameters “width” and “height” The shape is drawn within a bounding box of [0,width] x [0,height].

Inheritance

Inheritance diagram of Ellipse
Parameters
  • width (int) –

  • height (int) –

  • fill_color (Optional[Tuple[int, int, int]]) –

  • border_color (Optional[Tuple[int, int, int]]) –

  • border_thickness (int) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Polygon(points, fill_color=(0, 0, 0), border_color=(0, 0, 0), border_thickness=1)

This class represents/draws a polygon consisting of a list of points. The polygon will be drawn “as is”; the width/height are the maximum x/y coordinates. The minimum x/y coordinates should be zero and never be negative (however, this is not checked). Container objects will use the bounding box [0, max_x] x [0, max_y] to frame the object.

Inheritance

Inheritance diagram of Polygon
Parameters
  • points (List[Tuple[int, int]]) –

  • fill_color (Optional[Tuple[int, int, int]]) –

  • border_color (Optional[Tuple[int, int, int]]) –

  • border_thickness (int) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Text(text, color=(0, 0, 0), background_color=None, font_height=16, bold=False, italic=False, fixed_width=True)

This class represents/draws text specified by a string. The text can be drawn in different colors and an optional background color (rectangle that fills the space behind the text). One can choose two font styles (fixed width [default] and proportional), as well as bold and italic text.

Inheritance

Inheritance diagram of Text
Parameters
  • text (str) –

  • color (Tuple[int, int, int]) –

  • background_color (Optional[Tuple[int, int, int]]) –

  • font_height (int) –

  • bold (bool) –

  • italic (bool) –

  • fixed_width (bool) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.VerticalStack(objects, margin=0)

This class stores a list of image objects that are stacked vertically on top of each other when being drawn. The first object in the list is the top-most (smallest y-coordinate). An optional margin parameter leaves a bit of room around the objects (on all sides).

Inheritance

Inheritance diagram of VerticalStack
Parameters
draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.HorizontalStack(objects, margin=0)

This class stores a list of image objects that are stacked horizontally next to each other when being drawn. The first object in the list is the left-most (smallest x-coordinate). An optional margin parameter leaves a bit of room around the objects (on all sides).

Inheritance

Inheritance diagram of HorizontalStack
Parameters
draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Overlay(objects)

This class stores a list of image objects drawn over each other. The first object in the list is drawn first, i.e., it will appear as the back-most.

Inheritance

Inheritance diagram of Overlay
Parameters

objects (List[jguvc_eip.image_objects.ImageObject]) –

draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Translate(obj, offset_x, offset_y)

This class is a container that translates (shifts in space) the position of the contained object. It adds the specified offset in x- and y-direction to all coordinates.

Inheritance

Inheritance diagram of Translate
Parameters
draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Scale(obj, scale)

This class is a container that scales the contained object (changes its size by a factor) It multiplies the specified scale factor with all coordinates.

Inheritance

Inheritance diagram of Scale
Parameters
draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int

class jguvc_eip.image_objects.Rotate(obj, rotation_angle)

This class is a container that rotates the contained object counterclockwise around the center of its bounding box. The rotation angle is given in degree (0..360°).

Inheritance

Inheritance diagram of Rotate
Parameters
draw(painter)

Draws the object on a “QT Painter” (a device one can draw on such as an image or window) Do not use this function from the outside; it is only relevant when defining new image objects. :type painter: QPainter :param painter: the target of the drawing operation

Return type

None

Parameters

painter (PyQt5.QtGui.QPainter) –

get_height()

returns the height of the object in pixel :rtype: int :return: height in pixel

Return type

int

get_width()

returns the width of the object in pixel :rtype: int :return: width in pixel

Return type

int