GTRefiner.GTRepresentation.Interfaces package¶
Submodules¶
GTRefiner.GTRepresentation.Interfaces.GTInterfaces module¶
- class GTRefiner.GTRepresentation.Interfaces.GTInterfaces.Croppable¶
Bases:
object
- abstract crop(current_dim: ImageDimension, target_dim: ImageDimension, cut_left: bool)¶
Introduces the behaviour of a croppable object. Based on a current dimension and a target dimension the object implementing this behaviour should be able to be cropped to the target dimension. :param current_dim: Current dimension :type current_dim: ImageDimension :param target_dim: Target dimension :type target_dim: ImageDimension
- class GTRefiner.GTRepresentation.Interfaces.GTInterfaces.Dictionable¶
Bases:
object
- abstract build() Dict ¶
Introduces the behaviour of a JSON compliant represenation. The returned dictionary is supposed to be stored in a JSON file. :return: Dictionary of all the vector objects of interest. :rtype: dict
- class GTRefiner.GTRepresentation.Interfaces.GTInterfaces.Drawable¶
Bases:
object
- abstract draw(drawer: ImageDraw, color: Optional[Tuple] = None, outline=None)¶
Draw the vector object or collection of vector_objects. Useful for drawing on :class: Layer, for debugging purposes, and used by the :class: Showable interface.
- class GTRefiner.GTRepresentation.Interfaces.GTInterfaces.Scalable¶
Bases:
object
- abstract resize(current_dim: ImageDimension, target_dim: ImageDimension)¶
Introduces the behaviour of a scalable object. Based on a current dimension and a target dimension the object implementing this behaviour should be able to scale to the target dimension. :param current_dim: Current dimension :type current_dim: ImageDimension :param target_dim: Target dimension :type target_dim: ImageDimension
- class GTRefiner.GTRepresentation.Interfaces.GTInterfaces.Showable¶
Bases:
object
- abstract show()¶
Draw the vector object or collection of vector_objects and show them on an Pillow Image. Useful to debug and make sure that the program is doing what it’s supposed to. Closely related to the :class: Showable interface.