src/eric7/Snapshot/SnapshotFreehandGrabber.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
21 QPolygon, 21 QPolygon,
22 QRegion, 22 QRegion,
23 ) 23 )
24 from PyQt6.QtWidgets import QToolTip, QWidget 24 from PyQt6.QtWidgets import QToolTip, QWidget
25 25
26 from eric7 import Globals 26 from eric7.SystemUtilities import OSUtilities
27 27
28 28
29 def drawPolygon(painter, polygon, outline, fill=None): 29 def drawPolygon(painter, polygon, outline, fill=None):
30 """ 30 """
31 Module function to draw a polygon with the given parameters. 31 Module function to draw a polygon with the given parameters.
102 102
103 def __initialize(self): 103 def __initialize(self):
104 """ 104 """
105 Private slot to initialize the rest of the widget. 105 Private slot to initialize the rest of the widget.
106 """ 106 """
107 if Globals.isMacPlatform(): 107 if OSUtilities.isMacPlatform():
108 # macOS variant 108 # macOS variant
109 screen = QGuiApplication.screenAt(QCursor.pos()) 109 screen = QGuiApplication.screenAt(QCursor.pos())
110 geom = screen.geometry() 110 geom = screen.geometry()
111 self.__pixmap = screen.grabWindow( 111 self.__pixmap = screen.grabWindow(
112 0, geom.x(), geom.y(), geom.width(), geom.height() 112 0, geom.x(), geom.y(), geom.width(), geom.height()

eric ide

mercurial