File size: 1,072 Bytes
26f7fa0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""
MLSTRUCT-FP - DB - CITEM

Item component.
"""

__all__ = ['Item']

from MLStructFP.db._c import BasePolyObj
from MLStructFP._types import List, TYPE_CHECKING

if TYPE_CHECKING:
    from MLStructFP.db._floor import Floor


class Item(BasePolyObj):
    """
    FP Item.
    """

    def __init__(
            self,
            item_id: int,
            floor: 'Floor',
            x: List[float],
            y: List[float],
            color: str,
            category: int,
            category_name: str
    ) -> None:
        """
        Constructor.

        :param item_id: ID of the item
        :param floor: Floor object
        :param x: List of coordinates within x-axis
        :param y: List of coordinates within y-axis
        :param color: Item color
        :param category: Item category
        :param category_name: Item category name
        """
        # noinspection PyProtectedMember
        BasePolyObj.__init__(self, floor._item, 'Item', item_id, floor, x, y, color,
                             category=category, category_name=category_name)