Commit e66d67fe authored by hejulian's avatar hejulian

resize, remove image save

parent f1c0f3f9
...@@ -9,8 +9,8 @@ class Canvas(QtWidgets.QLabel): ...@@ -9,8 +9,8 @@ class Canvas(QtWidgets.QLabel):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.width = 320 self.width = 300
self.height = 320 self.height = 300
pixmap = QtGui.QPixmap(self.width, self.height) pixmap = QtGui.QPixmap(self.width, self.height)
# pixmap = pixmap.scaled(self.width*5, self.height*5) # pixmap = pixmap.scaled(self.width*5, self.height*5)
self.setPixmap(pixmap) self.setPixmap(pixmap)
...@@ -26,7 +26,7 @@ class Canvas(QtWidgets.QLabel): ...@@ -26,7 +26,7 @@ class Canvas(QtWidgets.QLabel):
empty = np.zeros((self.width, self.height)) empty = np.zeros((self.width, self.height))
self.pixmap().fill(Qt.GlobalColor.transparent) self.pixmap().fill(Qt.GlobalColor.transparent)
self.update() self.update()
self.report_pixels() # self.report_pixels()
def report_pixels(self): def report_pixels(self):
...@@ -55,7 +55,7 @@ class Canvas(QtWidgets.QLabel): ...@@ -55,7 +55,7 @@ class Canvas(QtWidgets.QLabel):
painter.setPen(p) painter.setPen(p)
painter.drawLine(self.last_x, self.last_y, e.x(), e.y()) painter.drawLine(self.last_x, self.last_y, e.x(), e.y())
self.report_pixels() # self.report_pixels()
painter.end() painter.end()
self.update() self.update()
...@@ -103,7 +103,7 @@ class MainWindow(QtWidgets.QMainWindow): ...@@ -103,7 +103,7 @@ class MainWindow(QtWidgets.QMainWindow):
l.addLayout(palette) l.addLayout(palette)
self.setCentralWidget(w) self.setCentralWidget(w)
self.showFullScreen() # self.showFullScreen()
def button_pressed(self): def button_pressed(self):
print("Button Pressed") print("Button Pressed")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment