Codes » display_img.py
| 1 |
#!/usr/bin/env python
|
|---|---|
| 2 |
# -*- coding: utf-8 -*-
|
| 3 |
|
| 4 |
class DisplayImg: |
| 5 |
"""!
|
| 6 |
@brief A class to represent and manage image display properties.
|
| 7 |
"""
|
| 8 |
|
| 9 |
def __init__(self, w, h,overlap, img, side): |
| 10 |
"""!
|
| 11 |
@brief Constructor for the DisplayImg class.
|
| 12 |
@param w The width of the display area.
|
| 13 |
@param h The height of the display area.
|
| 14 |
@param overlap The overlap percentage for the display area.
|
| 15 |
@param img The image to be displayed.
|
| 16 |
@param side The side or orientation of the display.
|
| 17 |
"""
|
| 18 |
self.__p_width = w |
| 19 |
self.__p_height = h |
| 20 |
self.__p_overlap = overlap |
| 21 |
self.__img = img |
| 22 |
self.__side = side |
| 23 |
|
| 24 |
def getImg(self): |
| 25 |
"""!
|
| 26 |
@brief Getter for the image.
|
| 27 |
@return The image associated with the display.
|
| 28 |
"""
|
| 29 |
return self.__img |
| 30 |
|
| 31 |
def getWidth(self): |
| 32 |
"""!
|
| 33 |
@brief Getter for the width of the display.
|
| 34 |
@return The width of the display area.
|
| 35 |
"""
|
| 36 |
return self.__p_width |
| 37 |
|
| 38 |
def getHeight(self): |
| 39 |
"""!
|
| 40 |
@brief Getter for the height of the display.
|
| 41 |
@return The height of the display area.
|
| 42 |
"""
|
| 43 |
return self.__p_height |
| 44 |
|
| 45 |
def getOverlap(self): |
| 46 |
"""!
|
| 47 |
@brief Getter for the overlap percentage.
|
| 48 |
@return The overlap percentage of the display area.
|
| 49 |
"""
|
| 50 |
return self.__p_overlap |
| 51 |
|
| 52 |
def getSide(self): |
| 53 |
"""!
|
| 54 |
@brief Getter for the side/orientation of the display.
|
| 55 |
@return The side or orientation of the display.
|
| 56 |
"""
|
| 57 |
return self.__side |