Exemplo n.º 1
0
 def setup(self, size):
     dpi = widgets.DesktopWidget().logicalDpiX()
     self.setResolution(dpi)
     self.setPageMargins(core.MarginsF(0, 0, 0, 0))
     self.setPageSizeMM(
         core.SizeF(size.width(), size.height()) / dpi * 25.4)
Exemplo n.º 2
0
def test_sizef():
    size = core.SizeF(2.5, 2.5)
    assert tuple(size) == (2.5, 2.5)
    size = size.expanded_to(core.SizeF(4, 4))
Exemplo n.º 3
0
 def get_size(self) -> core.SizeF:
     return core.SizeF(self.size())
Exemplo n.º 4
0
 def get_native_size(self) -> core.SizeF:
     return core.SizeF(self.nativeSize())
Exemplo n.º 5
0
 def get_contents_size(self) -> core.SizeF:
     return core.SizeF(self.contentsSize())
Exemplo n.º 6
0
def test_sizef():
    size = core.SizeF()
    repr(size)
Exemplo n.º 7
0
 def get_physical_size(self) -> core.SizeF:
     return core.SizeF(self.physicalSize())