MockupEngineer/MockupModule/templates/iphonexr/__init__.py

32 lines
974 B
Python
Raw Normal View History

2021-12-29 19:52:41 +03:00
from dataclasses import dataclass
2022-01-22 09:17:42 +03:00
from MockupModule.templates import Template
2021-12-29 19:52:41 +03:00
@dataclass
class Device(Template):
2022-01-22 09:17:42 +03:00
def __device_init__(self):
2021-12-29 19:52:41 +03:00
self.manufacturer = 'Apple'
self.name = 'iPhone Xr'
self.type = 'phone'
self.year = 2018
2022-01-22 09:17:42 +03:00
self.resolution = '{width} x {height}'.format(width=828, height=1792)
2021-12-29 19:52:41 +03:00
2022-01-22 09:17:42 +03:00
self.__template_path__ = 'iphonexr'
self.__colors__ = {"Blue": 'blue',
"Coral": 'coral',
"PRODUCT RED": 'red',
"Silver": 'silver',
"Space Gray": 'spacegray',
"Yellow": 'yellow'}
2021-12-29 19:52:41 +03:00
2022-01-22 09:17:42 +03:00
self.__portrait_width__ = 828
self.__portrait_height__ = 1792
self.__portrait_x__ = 110
self.__portrait_y__ = 110
2021-12-29 19:52:41 +03:00
2022-01-22 09:17:42 +03:00
self.__landscape_width__ = 1792
self.__landscape_height__ = 828
self.__landscape_x__ = 110
self.__landscape_y__ = 110