程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Graphics system drawing software based on pythongui

編輯:Python

Catalog
One . review 1
What's done ( The extra function is the bold part ) 1
Two . Algorithm is introduced 3

  1. DDA 3
  2. bresenham 4
    3. Midpoint ellipse 5
    4.bezier draw a curve 6
    5.B-Spline draw a curve 7
    6. Primitive transformation 9
  3. Cohen-Sutherland Line segment clipping algorithm 10
  4. Liang-Barsky Line segment clipping algorithm 11
    9. Polygon scan line filling algorithm 12
    10. Region seed filling algorithm 14
  5. Nicholl-Lee-Nicholl Line segment clipping algorithm 15
  6. Sutherland-Hodgeman Polygon clipping algorithm 16
    12. Character primitive drawing algorithm 17
    3、 ... and .Gui System introduction 17
    1. General framework 17
    2. Module partition 18
    4. Interface design 21
    Four .Cli System introduction 21
    5、 ... and . Feel and summarize 22
    6、 ... and . Reference material 25
    7、 ... and . Progress log 25
    One . review
    Plan to complete a fully functional graphics system . Realize various graphics algorithms , Complete the common functions of drawing software . Such as the drawing of common graphics 、 translation 、 rotate 、 Shrinkage 、 tailoring 、 Filling, etc . The system is divided into two parts ,gui Some of them interact in the form of graphical interface ;cli Part of the interaction is in the form of reading the file command line .
    What's done ( The extra function is the bold part )
    Gui System : New canvas 、 Open the picture 、 Save the picture 、 Save as 、 About information 、 Exit canvas 、 Draw a straight line (DDA and bresenham)、 Draw polygon (DDA and bresenham)、 Draw a rectangle 、 Draw triangle 、 Draw the ellipse ( Midpoint method )、 draw a curve (Bezier and B-spline)、 Draw characters 、 Set brush color 、 Thickness setting 、 The pencil 、 brush 、 rubber 、 Select elements ( You can adjust the control points of elements and copy and paste )、 Shortcut key 、 Translate elements 、 Rotating elements 、 Zoom element 、 Crop line entities (Cohen-
    Sutherland 、 Liang-Barsky and Nicholl-Lee-Nicholl ) 、 The cutting cut many edge shape chart element
    (Sutherland-Hodgeman)、 Fill elements ( Polygon scanline filling and area seed filling )、 Cancel the operation 、 Redo the operation 、 Empty the canvas 、 When exiting, if the drawing board is modified, you will be prompted to save 、 The status bar shows the current mouse pixel position 、 Operation sequence and status 、 Drawing board size, etc
    Cli System : Identify document instructions 、 Generation modeling of primitive objects 、 Painting and saving canvas
    Reprinted from :http://www.biyezuopin.vip/onews.asp?id=16532
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1523, 916)
MainWindow.setMinimumSize(QtCore.QSize(100, 100))
MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setMinimumSize(QtCore.QSize(1000, 800))
self.centralWidget.setMaximumSize(QtCore.QSize(1000, 800))
self.centralWidget.setObjectName("centralWidget")
MainWindow.setCentralWidget(self.centralWidget)
self.mainToolBar = QtWidgets.QToolBar(MainWindow)
self.mainToolBar.setObjectName("mainToolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 1523, 26))
self.menuBar.setObjectName("menuBar")
self.menu = QtWidgets.QMenu(self.menuBar)
self.menu.setObjectName("menu")
self.menu_2 = QtWidgets.QMenu(self.menuBar)
self.menu_2.setObjectName("menu_2")
self.menu_3 = QtWidgets.QMenu(self.menu_2)
self.menu_3.setObjectName("menu_3")
self.menu_7 = QtWidgets.QMenu(self.menu_2)
self.menu_7.setObjectName("menu_7")
self.menu_8 = QtWidgets.QMenu(self.menu_2)
self.menu_8.setObjectName("menu_8")
self.menu_4 = QtWidgets.QMenu(self.menu_8)
self.menu_4.setObjectName("menu_4")
self.menu_9 = QtWidgets.QMenu(self.menu_8)
self.menu_9.setObjectName("menu_9")
self.menu_10 = QtWidgets.QMenu(self.menu_8)
self.menu_10.setObjectName("menu_10")
self.menu_5 = QtWidgets.QMenu(self.menuBar)
self.menu_5.setObjectName("menu_5")
self.menu_11 = QtWidgets.QMenu(self.menu_5)
self.menu_11.setObjectName("menu_11")
self.menu_6 = QtWidgets.QMenu(self.menuBar)
self.menu_6.setObjectName("menu_6")
MainWindow.setMenuBar(self.menuBar)
self.statusBar = QtWidgets.QStatusBar(MainWindow)
self.statusBar.setMinimumSize(QtCore.QSize(1000, 50))
self.statusBar.setMaximumSize(QtCore.QSize(1000, 50))
self.statusBar.setObjectName("statusBar")
MainWindow.setStatusBar(self.statusBar)
self.actionSave_as = QtWidgets.QAction(MainWindow)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionSave_as.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionSave_as.setIcon(icon)
self.actionSave_as.setObjectName("actionSave_as")
self.actionAbout = QtWidgets.QAction(MainWindow)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionAbout.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionAbout.setIcon(icon1)
self.actionAbout.setObjectName("actionAbout")
self.actionExit = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionExit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionExit.setIcon(icon2)
self.actionExit.setObjectName("actionExit")
self.actionNew = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionNew.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionNew.setIcon(icon3)
self.actionNew.setObjectName("actionNew")
self.actionShape = QtWidgets.QAction(MainWindow)
self.actionShape.setObjectName("actionShape")
self.actionColor = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionColor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionColor.setIcon(icon4)
self.actionColor.setObjectName("actionColor")
self.actionChoose = QtWidgets.QAction(MainWindow)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionChoose.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionChoose.setIcon(icon5)
self.actionChoose.setObjectName("actionChoose")
self.actionScale = QtWidgets.QAction(MainWindow)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionScale.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionScale.setIcon(icon6)
self.actionScale.setObjectName("actionScale")
self.actionRotate = QtWidgets.QAction(MainWindow)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionRotate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionRotate.setIcon(icon7)
self.actionRotate.setObjectName("actionRotate")
self.actionPencil = QtWidgets.QAction(MainWindow)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionPencil.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionPencil.setIcon(icon8)
self.actionPencil.setObjectName("actionPencil")
self.actionBrush = QtWidgets.QAction(MainWindow)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionBrush.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBrush.setIcon(icon9)
self.actionBrush.setObjectName("actionBrush")
self.actionEraser = QtWidgets.QAction(MainWindow)
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionEraser.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionEraser.setIcon(icon10)
self.actionEraser.setObjectName("actionEraser")
self.actionUndo = QtWidgets.QAction(MainWindow)
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionUndo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionUndo.setIcon(icon11)
self.actionUndo.setObjectName("actionUndo")
self.actionRedo = QtWidgets.QAction(MainWindow)
icon12 = QtGui.QIcon()
icon12.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionRedo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionRedo.setIcon(icon12)
self.actionRedo.setObjectName("actionRedo")
self.actionClear = QtWidgets.QAction(MainWindow)
icon13 = QtGui.QIcon()
icon13.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionClear.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionClear.setIcon(icon13)
self.actionClear.setObjectName("actionClear")
self.actionThick = QtWidgets.QAction(MainWindow)
icon14 = QtGui.QIcon()
icon14.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionThick.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionThick.setIcon(icon14)
self.actionThick.setObjectName("actionThick")
self.actionNormal = QtWidgets.QAction(MainWindow)
icon15 = QtGui.QIcon()
icon15.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionNormal.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionNormal.setIcon(icon15)
self.actionNormal.setObjectName("actionNormal")
self.actionThin = QtWidgets.QAction(MainWindow)
icon16 = QtGui.QIcon()
icon16.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionThin.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionThin.setIcon(icon16)
self.actionThin.setObjectName("actionThin")
self.actionRectangle = QtWidgets.QAction(MainWindow)
icon17 = QtGui.QIcon()
icon17.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionRectangle.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionRectangle.setIcon(icon17)
self.actionRectangle.setObjectName("actionRectangle")
self.actionOval = QtWidgets.QAction(MainWindow)
icon18 = QtGui.QIcon()
icon18.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionOval.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionOval.setIcon(icon18)
self.actionOval.setObjectName("actionOval")
self.actionTriangle = QtWidgets.QAction(MainWindow)
icon19 = QtGui.QIcon()
icon19.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionTriangle.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionTriangle.setIcon(icon19)
self.actionTriangle.setObjectName("actionTriangle")
self.actionMove = QtWidgets.QAction(MainWindow)
icon20 = QtGui.QIcon()
icon20.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionMove.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionMove.setIcon(icon20)
self.actionMove.setObjectName("actionMove")
self.actionDDA = QtWidgets.QAction(MainWindow)
icon21 = QtGui.QIcon()
icon21.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionDDA.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionDDA.setIcon(icon21)
self.actionDDA.setObjectName("actionDDA")
self.actionBresenham = QtWidgets.QAction(MainWindow)
icon22 = QtGui.QIcon()
icon22.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionBresenham.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBresenham.setIcon(icon22)
self.actionBresenham.setObjectName("actionBresenham")
self.actionBezier = QtWidgets.QAction(MainWindow)
icon23 = QtGui.QIcon()
icon23.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionBezier.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBezier.setIcon(icon23)
self.actionBezier.setObjectName("actionBezier")
self.actionDDA2 = QtWidgets.QAction(MainWindow)
icon24 = QtGui.QIcon()
icon24.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionDDA2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionDDA2.setIcon(icon24)
self.actionDDA2.setObjectName("actionDDA2")
self.actionBresenham2 = QtWidgets.QAction(MainWindow)
icon25 = QtGui.QIcon()
icon25.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionBresenham2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionBresenham2.setIcon(icon25)
self.actionBresenham2.setObjectName("actionBresenham2")
self.actionCohen_Sutherland = QtWidgets.QAction(MainWindow)
icon26 = QtGui.QIcon()
icon26.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionCohen-Sutherland.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionCohen_Sutherland.setIcon(icon26)
self.actionCohen_Sutherland.setObjectName("actionCohen_Sutherland")
self.actionLiang_Barsky = QtWidgets.QAction(MainWindow)
icon27 = QtGui.QIcon()
icon27.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionLiang-Barsky.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionLiang_Barsky.setIcon(icon27)
self.actionLiang_Barsky.setObjectName("actionLiang_Barsky")
self.actionB_spline = QtWidgets.QAction(MainWindow)
icon28 = QtGui.QIcon()
icon28.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionB_spline.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionB_spline.setIcon(icon28)
self.actionB_spline.setObjectName("actionB_spline")
self.actionCopy = QtWidgets.QAction(MainWindow)
icon29 = QtGui.QIcon()
icon29.addPixmap(QtGui.QPixmap(":/pic/resouce/actionCopy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionCopy.setIcon(icon29)
self.actionCopy.setObjectName("actionCopy")
self.actionPaste = QtWidgets.QAction(MainWindow)
icon30 = QtGui.QIcon()
icon30.addPixmap(QtGui.QPixmap(":/pic/resouce/actionPaste.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionPaste.setIcon(icon30)
self.actionPaste.setObjectName("actionPaste")
self.actionLast = QtWidgets.QAction(MainWindow)
icon31 = QtGui.QIcon()
icon31.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionLast.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionLast.setIcon(icon31)
self.actionLast.setObjectName("actionLast")
self.actionNext = QtWidgets.QAction(MainWindow)
icon32 = QtGui.QIcon()
icon32.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionNext.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionNext.setIcon(icon32)
self.actionNext.setObjectName("actionNext")
self.actionFill = QtWidgets.QAction(MainWindow)
icon33 = QtGui.QIcon()
icon33.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionFill.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionFill.setIcon(icon33)
self.actionFill.setObjectName("actionFill")
self.actionNicholl_Lee_Nicholl = QtWidgets.QAction(MainWindow)
icon34 = QtGui.QIcon()
icon34.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionNicholl-Lee-Nicholl.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionNicholl_Lee_Nicholl.setIcon(icon34)
self.actionNicholl_Lee_Nicholl.setObjectName("actionNicholl_Lee_Nicholl")
self.actionSutherland_Hodgeman = QtWidgets.QAction(MainWindow)
icon35 = QtGui.QIcon()
icon35.addPixmap(QtGui.QPixmap(":/pic/resouce/Sutherland-Hodgeman.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionSutherland_Hodgeman.setIcon(icon35)
self.actionSutherland_Hodgeman.setObjectName("actionSutherland_Hodgeman")
self.actionWord = QtWidgets.QAction(MainWindow)
icon36 = QtGui.QIcon()
icon36.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionWord.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionWord.setIcon(icon36)
self.actionWord.setObjectName("actionWord")
self.actionLock = QtWidgets.QAction(MainWindow)
icon37 = QtGui.QIcon()
icon37.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionLock.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionLock.setIcon(icon37)
self.actionLock.setObjectName("actionLock")
self.actionSaveFile = QtWidgets.QAction(MainWindow)
icon38 = QtGui.QIcon()
icon38.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionSave.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionSaveFile.setIcon(icon38)
self.actionSaveFile.setObjectName("actionSaveFile")
self.actionOpenFile = QtWidgets.QAction(MainWindow)
icon39 = QtGui.QIcon()
icon39.addPixmap(QtGui.QPixmap(":/pic/resouce/ActionOpen.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.actionOpenFile.setIcon(icon39)
self.actionOpenFile.setObjectName("actionOpenFile")
self.mainToolBar.addAction(self.actionNew)
self.mainToolBar.addAction(self.actionOpenFile)
self.mainToolBar.addAction(self.actionSaveFile)
self.mainToolBar.addAction(self.actionSave_as)
self.mainToolBar.addAction(self.actionAbout)
self.mainToolBar.addAction(self.actionExit)
self.mainToolBar.addSeparator()
self.mainToolBar.addAction(self.actionPencil)
self.mainToolBar.addAction(self.actionBrush)
self.mainToolBar.addAction(self.actionEraser)
self.mainToolBar.addAction(self.actionDDA)
self.mainToolBar.addAction(self.actionBresenham)
self.mainToolBar.addAction(self.actionRectangle)
self.mainToolBar.addAction(self.actionTriangle)
self.mainToolBar.addAction(self.actionDDA2)
self.mainToolBar.addAction(self.actionBresenham2)
self.mainToolBar.addAction(self.actionOval)
self.mainToolBar.addAction(self.actionBezier)
self.mainToolBar.addAction(self.actionB_spline)
self.mainToolBar.addAction(self.actionWord)
self.mainToolBar.addAction(self.actionColor)
self.mainToolBar.addAction(self.actionThick)
self.mainToolBar.addAction(self.actionNormal)
self.mainToolBar.addAction(self.actionThin)
self.mainToolBar.addSeparator()
self.mainToolBar.addAction(self.actionChoose)
self.mainToolBar.addAction(self.actionLast)
self.mainToolBar.addAction(self.actionNext)
self.mainToolBar.addAction(self.actionCopy)
self.mainToolBar.addAction(self.actionPaste)
self.mainToolBar.addAction(self.actionMove)
self.mainToolBar.addAction(self.actionRotate)
self.mainToolBar.addAction(self.actionScale)
self.mainToolBar.addAction(self.actionCohen_Sutherland)
self.mainToolBar.addAction(self.actionLiang_Barsky)
self.mainToolBar.addAction(self.actionNicholl_Lee_Nicholl)
self.mainToolBar.addAction(self.actionSutherland_Hodgeman)
self.mainToolBar.addAction(self.actionFill)
self.mainToolBar.addAction(self.actionLock)
self.mainToolBar.addSeparator()
self.mainToolBar.addAction(self.actionUndo)
self.mainToolBar.addAction(self.actionRedo)
self.mainToolBar.addAction(self.actionClear)
self.menu.addAction(self.actionNew)
self.menu.addAction(self.actionOpenFile)
self.menu.addAction(self.actionSaveFile)
self.menu.addAction(self.actionSave_as)
self.menu.addSeparator()
self.menu.addAction(self.actionAbout)
self.menu.addSeparator()
self.menu.addAction(self.actionExit)
self.menu.addSeparator()
self.menu_3.addAction(self.actionPencil)
self.menu_3.addAction(self.actionBrush)
self.menu_3.addAction(self.actionEraser)
self.menu_7.addAction(self.actionThick)
self.menu_7.addAction(self.actionNormal)
self.menu_7.addAction(self.actionThin)
self.menu_4.addAction(self.actionDDA)
self.menu_4.addAction(self.actionBresenham)
self.menu_9.addAction(self.actionBezier)
self.menu_9.addAction(self.actionB_spline)
self.menu_10.addAction(self.actionDDA2)
self.menu_10.addAction(self.actionBresenham2)
self.menu_8.addAction(self.menu_4.menuAction())
self.menu_8.addAction(self.menu_10.menuAction())
self.menu_8.addAction(self.menu_9.menuAction())
self.menu_8.addAction(self.actionRectangle)
self.menu_8.addAction(self.actionOval)
self.menu_8.addAction(self.actionTriangle)
self.menu_8.addAction(self.actionWord)
self.menu_2.addAction(self.menu_3.menuAction())
self.menu_2.addAction(self.menu_8.menuAction())
self.menu_2.addSeparator()
self.menu_2.addAction(self.actionColor)
self.menu_2.addAction(self.menu_7.menuAction())
self.menu_11.addAction(self.actionCohen_Sutherland)
self.menu_11.addAction(self.actionLiang_Barsky)
self.menu_11.addAction(self.actionNicholl_Lee_Nicholl)
self.menu_11.addAction(self.actionSutherland_Hodgeman)
self.menu_5.addAction(self.actionChoose)
self.menu_5.addAction(self.actionCopy)
self.menu_5.addAction(self.actionPaste)
self.menu_5.addAction(self.actionMove)
self.menu_5.addAction(self.actionRotate)
self.menu_5.addAction(self.actionScale)
self.menu_5.addAction(self.menu_11.menuAction())
self.menu_5.addAction(self.actionFill)
self.menu_5.addAction(self.actionLock)
self.menu_5.addAction(self.actionLast)
self.menu_5.addAction(self.actionNext)
self.menu_6.addAction(self.actionUndo)
self.menu_6.addAction(self.actionRedo)
self.menu_6.addAction(self.actionClear)
self.menuBar.addAction(self.menu.menuAction())
self.menuBar.addAction(self.menu_2.menuAction())
self.menuBar.addAction(self.menu_5.menuAction())
self.menuBar.addAction(self.menu_6.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.menu.setTitle(_translate("MainWindow", " file "))
self.menu_2.setTitle(_translate("MainWindow", " function "))
self.menu_3.setTitle(_translate("MainWindow", " Drawing tools "))
self.menu_7.setTitle(_translate("MainWindow", " Thickness selection "))
self.menu_8.setTitle(_translate("MainWindow", " Common shapes "))
self.menu_4.setTitle(_translate("MainWindow", " A straight line "))
self.menu_9.setTitle(_translate("MainWindow", " curve "))
self.menu_10.setTitle(_translate("MainWindow", " polygon "))
self.menu_5.setTitle(_translate("MainWindow", " edit "))
self.menu_11.setTitle(_translate("MainWindow", " tailoring "))
self.menu_6.setTitle(_translate("MainWindow", " View "))
self.actionSave_as.setText(_translate("MainWindow", " Save another "))
self.actionAbout.setText(_translate("MainWindow", " About "))
self.actionExit.setText(_translate("MainWindow", " sign out "))
self.actionNew.setText(_translate("MainWindow", " newly build "))
self.actionShape.setText(_translate("MainWindow", " Graphic selection "))
self.actionColor.setText(_translate("MainWindow", " Color choices "))
self.actionChoose.setText(_translate("MainWindow", " choice "))
self.actionScale.setText(_translate("MainWindow", " The zoom "))
self.actionRotate.setText(_translate("MainWindow", " rotate "))
self.actionPencil.setText(_translate("MainWindow", " The pencil "))
self.actionBrush.setText(_translate("MainWindow", " brush "))
self.actionEraser.setText(_translate("MainWindow", " rubber "))
self.actionUndo.setText(_translate("MainWindow", " revoke "))
self.actionRedo.setText(_translate("MainWindow", " redo "))
self.actionClear.setText(_translate("MainWindow", " Empty "))
self.actionThick.setText(_translate("MainWindow", " crude "))
self.actionNormal.setText(_translate("MainWindow", " in "))
self.actionThin.setText(_translate("MainWindow", " fine "))
self.actionRectangle.setText(_translate("MainWindow", " rectangular "))
self.actionOval.setText(_translate("MainWindow", " The ellipse "))
self.actionTriangle.setText(_translate("MainWindow", " Triangle "))
self.actionMove.setText(_translate("MainWindow", " translation "))
self.actionDDA.setText(_translate("MainWindow", "DDA"))
self.actionBresenham.setText(_translate("MainWindow", "Bresenham"))
self.actionBezier.setText(_translate("MainWindow", "Bezier"))
self.actionDDA2.setText(_translate("MainWindow", "DDA"))
self.actionBresenham2.setText(_translate("MainWindow", "Bresenham"))
self.actionCohen_Sutherland.setText(_translate("MainWindow", "Cohen-Sutherland"))
self.actionLiang_Barsky.setText(_translate("MainWindow", "Liang-Barsky"))
self.actionB_spline.setText(_translate("MainWindow", "B-spline"))
self.actionCopy.setText(_translate("MainWindow", " Copy "))
self.actionPaste.setText(_translate("MainWindow", " Paste "))
self.actionLast.setText(_translate("MainWindow", " the previous "))
self.actionNext.setText(_translate("MainWindow", " next "))
self.actionFill.setText(_translate("MainWindow", " fill "))
self.actionNicholl_Lee_Nicholl.setText(_translate("MainWindow", "Nicholl-Lee-Nicholl"))
self.actionSutherland_Hodgeman.setText(_translate("MainWindow", "Sutherland-Hodgeman"))
self.actionWord.setText(_translate("MainWindow", " character "))
self.actionLock.setText(_translate("MainWindow", " encryption "))
self.actionSaveFile.setText(_translate("MainWindow", " Save the picture "))
self.actionOpenFile.setText(_translate("MainWindow", " Open the picture "))
import myresouce_rc




























  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved