freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java面向?qū)ο笳n程設(shè)計(jì)報(bào)告畫(huà)圖板畢業(yè)設(shè)計(jì)word格式(編輯修改稿)

2025-01-04 11:28 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 == null) { setIcon(null)。 return。 } ImageIcon icon = new ImageIcon(())。 if (() getWidth()) icon = new ImageIcon(() .getScaledInstance(getWidth(), 1, ))。//圖片太大,設(shè)置為縮略圖 setIcon(icon)。 } } })。 } } void SaveFile()//保存文件功能 { int s = (null)。 Graphics2D g2d=(Graphics2D)gg。 for(int i=0。i=index。i++)//重新繪制 { itemlist[i].draw(g2d)。 } if (s == ) { try { (bi, jpg, ())。//輸出 } catch (Exception ex) { ()。 } 11 } } void OpenFile()//打開(kāi)文件 { int i = (null)。 if (i == ) { try {// 將文件圖像加載到內(nèi)存中 bi = (())。 // 更換圖像以后,畫(huà)筆也必須更換為新的畫(huà)筆 gg = ()。 // 畫(huà)筆默認(rèn)白色 (color)。 ()。 } catch (Exception ex) { ()。 } } } void NewFile() { index=0。 A=B1=C=D=0。 ()。// 將畫(huà)筆調(diào)整為白色 (0, 0, 1000, 600)。// 將圖像涂白 currentType=1。 color=。 currentstroke=1。 createNewItem()。 repaint()。//將有關(guān)值設(shè)置為初始狀態(tài),并且重畫(huà) } void createNewItem()//根 據(jù)不同的選擇創(chuàng)建不同的子類,實(shí)現(xiàn)圖形的繪制 { switch(currentType) { case 0: itemlist[index]=new Pencil()。//鉛筆畫(huà) break。 case 1: itemlist[index]=new Line()。//直線 break。 case 2: itemlist[index]=new Rectange()。//矩形 break。 12 case 3: itemlist[index]=new Oval()。//橢圓 break。 case 4: itemlist[index]=new RoundRect()。//圓角矩陣 break。 case 5: itemlist[index]=new Circle()。//圓 break。 case 6: itemlist[index]=new Rect3D()。//3D 立方體 break。 case 7: itemlist[index]=new Triangle()。//三角形 break。 case 8: itemlist[index]=new Tuo()。//橢圓重疊 break。 case 9: itemlist[index]=new SinCos()。//正余弦曲線 break。 case 10: itemlist[index]=new Eraser()。//橡皮檫 break。 } itemlist[index].type=currentType。//保存當(dāng)前選擇 itemlist[index].color=color。//保存當(dāng)前顏色 itemlist[index].fill=currentfill。//釋放填充 itemlist[index].isShiftDown=isShiftDown。//釋放按下 shift 鍵 itemlist[index].stroke=currentstroke。//當(dāng)前大小 itemlist[index].A=A。 itemlist[index].B1=B1。 itemlist[index].C=C。 itemlist[index].D=D。//正余弦曲線參數(shù) } class DrawPanel extends JPanel { // 畫(huà)圖區(qū)域類 public DrawPanel() { setCursor(())。 // 設(shè)置光標(biāo) bi = new BufferedImage (1000, 600, )。 gg = ()。 ()。// 將畫(huà)筆調(diào)整為白色 (0, 0, 1000, 600)。// 將圖像涂白 13 ()。// 將畫(huà)筆從新調(diào)成黑色 //setBackground()。 // 設(shè)置畫(huà)圖區(qū)域背景為白色 addMouseListener(new MouseA())。 // 給畫(huà)圖區(qū)域添加鼠標(biāo)監(jiān)聽(tīng)器 addMouseMotionListener(new MouseB())。 } public void paintComponent(Graphics g) { (color)。//設(shè)置顏色 (g)。 (bi, 0, 0, null)。// 手工強(qiáng)制清空面板 Graphics2D g2d=(Graphics2D)g。 float[] dashPattern = { 10f }。//條紋中短橫線的長(zhǎng)度 ( )。 // 創(chuàng)建條 紋筆跡 BasicStroke stroke1 = new BasicStroke(10F, , , 10f, dashPattern, 5f)。 (stroke1)。 // 獲取當(dāng)前面板的大小 Rectangle rect = getBounds()。 // 繪制黑色條紋邊框 (0, 0, , )。 // 設(shè)置前景色為黃色 ()。 // 創(chuàng)建新的條紋筆跡,顏色為黃色, 15f 較原來(lái)的 5f 偏移 10 個(gè)像素,因此彼此互相填充空白區(qū)域,產(chǎn)生間隔顯示的效果 stroke1 = new BasicStroke(10F, , , 10f, dashPattern, 15f)。 (stroke1)。 // 繪制黃色條紋邊框 (0, 0, , )。 for(int i=0。i=index。i++) { itemlist[i].draw(g2d)。 } } } class MouseA extends MouseAdapter { // 鼠標(biāo)進(jìn)入、點(diǎn)擊事件的監(jiān)聽(tīng)器 public void mousePressed(MouseEvent e) { itemlist[index].x1=itemlist[index].x2=()。 itemlist[index].y1=itemlist[index].y2=()。 if(currentType==0||currentType==10) { itemlist[index].x1=itemlist[index].x2=()。 itemlist[index].y1=itemlist[index].y2=()。 14 index++。 createNewItem()。 } if(currentType==9) { return。 } repaint()。 (鼠標(biāo)按下 [ + () + , + () + ])。 // 設(shè)置狀態(tài)欄文本 } public void mouseReleased(MouseEvent e) {//鼠標(biāo)釋放監(jiān)聽(tīng) if(currentType==0||currentType==10) { itemlist[index].x1=()。 itemlist[index].y1=()。 } if(currentType==9)//按下 調(diào)用 setAB()設(shè)置正余弦曲線參數(shù)值 { setAB()。 } itemlist[index].x2=()。 itemlist[index].y2=()。 repaint()。//刷新 index++。 createNewItem()。 (鼠標(biāo)釋放 [ + () + , + () + ])。 } public void mouseEntered(MouseEvent e) {//鼠標(biāo)進(jìn)入監(jiān)聽(tīng) (鼠標(biāo)進(jìn)入 [ + () + , + () + ])。 } public void mouseExited(MouseEvent e) { // 鼠標(biāo)移出 (鼠標(biāo)移出 [ + () + , + () + ])。 } } class MouseB extends MouseMotionAdapter { // 鼠標(biāo)移動(dòng)事件的監(jiān)聽(tīng)器 public void mouseDragged(MouseEvent e) { if(currentType==0||currentType==10) { itemlist[index1].x1=itemlist[index].x2=itemlist[index].x1=()。 itemlist[index1].y1=itemlist[index].y2=itemlist[index].y1=()。 index++。 15 createNewItem()。
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1