【正文】
ointer, Rectangle, Text, Curve, Image, Line }。 isNewObjectAdded = true。 = true。 int index = ()。 } }}(2)在解決方案管理器中,提供系統(tǒng)公共的屬性和方法。 } set { id = value。 } } protected Color penColor。 ()。 ()。主機(jī)接受后,返回WeleLogin命令,并把當(dāng)前的圖像圖像字節(jié)返回給附機(jī)。(3) GraphicsList類保存繪制對(duì)象的列表,同時(shí)實(shí)現(xiàn)繪圖對(duì)象的查找,刪除,選擇等功能?! rackText是所有文字繪制的基類,DrawMyText類從TrackText實(shí)現(xiàn)文字的繪制,如果需要其他效果的文字,一樣可以從TrackText類派生。 類TrackRectangle,TrackText,TracCurve都是從DrawObject繼承。使用Visual Studio 2008可以高效開發(fā)Windows應(yīng)用。 不論是主機(jī)還是附機(jī),每個(gè)聯(lián)合制作的計(jì)算機(jī)看到的設(shè)計(jì)界面都是一樣的。本次畢業(yè)設(shè)計(jì)的多機(jī)聯(lián)合繪圖系統(tǒng)分為類的設(shè)計(jì)和聯(lián)機(jī)操作兩大部分。s needs, an increasing number of people choose puter drawing software, learn traditional origins, current situation and development trend of drawing. Drawing on existing legacy software based on a parison of proposed functional requirements based on local area network drawing, confirms this need joint drawing system, LAN mapping software were discussed throughout the rest of the development process, focused on a number of joint cartographic munication techniques, and gives detailed implementation methods. Final summary of this mapping system developed by. As puter performance increase and development of theory and technology of puter vision, the technology will mature. Network technology is the mutual penetration of puter technology and munication technology and seamless integration of products. Computer graphics technology as an important aspect of puter applications. This multibined graduation design class design, and online mapping system divided into two parts. Where the class design was designed by drawing object classes and tools to design, programming with Microsoft Visual Studio 2008 software development tools to implement every part, finally achieving a bined drawing software, multiple puter merger system map.其中類的設(shè)計(jì)主要是由繪圖對(duì)象類設(shè)計(jì)和工具類設(shè)計(jì),用Microsoft Visual Studio 2008開發(fā)工具軟件編程來(lái)實(shí)現(xiàn)每一個(gè)部分,最后實(shí)現(xiàn)多機(jī)聯(lián)合繪圖軟件,多臺(tái)計(jì)算機(jī)聯(lián)合制圖。本人授權(quán)南昌航空大學(xué)科技學(xué)院可以將本論文的全部或部分內(nèi)容編入有關(guān)數(shù)據(jù)庫(kù)進(jìn)行檢索,可以采用影印、縮印或掃描等復(fù)制手段保存和匯編本學(xué)位論文。對(duì)本文的研究作出重要貢獻(xiàn)的個(gè)人和集體,均已在文中以明確方式表明。網(wǎng)絡(luò)技術(shù)是計(jì)算機(jī)技術(shù)和通信技術(shù)相互滲透而又緊密結(jié)合的產(chǎn)物。指導(dǎo)老師簽名:隨著計(jì)算機(jī)技術(shù)的發(fā)展和人們的需求,越來(lái)越多的人們選擇計(jì)算機(jī)繪圖軟件,了解傳統(tǒng)的繪圖軟件的起源、現(xiàn)狀和發(fā)展趨勢(shì);在對(duì)現(xiàn)有的傳統(tǒng)的繪圖軟件進(jìn)行分析比較的基礎(chǔ)上,提出了基于局域網(wǎng)的繪圖軟件的功能需求,接下來(lái)討論了基于局域網(wǎng)繪圖軟件的開發(fā)過(guò)程,著重分析了多機(jī)聯(lián)合制圖通信技術(shù),并給出了詳細(xì)的實(shí)現(xiàn)方法。多臺(tái)計(jì)算機(jī)在本地的局域網(wǎng)絡(luò)或者固定IP的Internet上制作同一張圖,制作時(shí)將計(jì)算機(jī)分為主機(jī)和附機(jī)。多機(jī)聯(lián)合繪圖系統(tǒng)以幾種具有代表性的圖形圖像的繪制方法為主,并不是實(shí)現(xiàn)所有圖形圖像的繪制。 為了統(tǒng)一管理各種繪圖對(duì)象,可以將要繪制的對(duì)象抽象成一個(gè)抽象基類DrawObject,其他的繪制對(duì)象則從DrawObject繼承,在擴(kuò)充類中,通過(guò)重寫DrawObject類的屬性和方法,即可實(shí)現(xiàn)針對(duì)特定的圖形圖像的繪制?! rackCurve是所有以點(diǎn)作為句柄特征的所有曲線類的基類。具體如下。對(duì)于附機(jī)來(lái)說(shuō)也是一樣的道理,字符串分為命令部分和參數(shù)部分,命令部分和參數(shù)部分之間以及參數(shù)部分的各個(gè)參數(shù)之間均用逗號(hào)分隔。 = true。 = new Palette()。 } }.1矩形的繪制(1)在解決方案管理器中,表示所有圖形圖像的基類,代碼定義如下;public abstract class DrawObject { private bool selected。 } set { penWidth = value。 } public override void Draw(Graphics g) { Pen pen = new Pen(penColor)。 ()。 ()。主要代碼如下;class ToolRectangle : ToolObject { public ToolRectangle() { } public override void OnMouseDown(Palette palette, MouseEventArgs e) { (palette, e)。 //左上角x坐標(biāo),左上角y坐標(biāo),寬,高,顏色,id ((DrawMyRectangle,{0},{1},{2},{3},{4},{5}, , , , , (), ))。(5)雙擊主程序窗體上的矩形按鈕,在其Click事件中添加代碼;activeTool=。Point類型的對(duì)象PointList,使其保存曲線所經(jīng)過(guò)的點(diǎn)的集合,PointList中的兩個(gè)相鄰點(diǎn)之間的距離大于指定的長(zhǎng)度。 } } else { (pen, pts)。 DrawMyCurve w = new DrawMyCurve(p, , 2, )。 if ( == ) { int dx = 。(3)在主窗體的構(gòu)造函數(shù)內(nèi)添加代碼;tools[(int)] = new ToolCurve()。 // private Point myLastPoint。 myFirstPoint = myFirstPoint1 = p。 int distance = (int)(dx * dx + dy * dy)。 if ( != null) { ()。 ()。 } Point point = new Point(, )。 DrawMyText w = (DrawMyText)[index]。 } set { text = value。 = false。 } }}(4)在主程序窗體MultiDraw2的構(gòu)造函數(shù)中,添加代碼:Tools[(int)]=new ToolText()。 = (Bitmap)()。 } else { //將bitmap設(shè)置為對(duì)其默認(rèn)的透明色透明 ()。 } (palette, e)。 //層號(hào),序列化后的字節(jié)數(shù) ((DrawMyImage,{0}, ))。 = 添加圖像。在繪制矩形時(shí),在ToolRectangle類的OnMouseUp事件中,向主機(jī)發(fā)送DrawMyRectangle命令,主機(jī)收到后再將發(fā)送給所有聯(lián)合制圖的計(jì)算機(jī)(包括主機(jī)和所有附機(jī))。 (\n導(dǎo)出成功\n\n導(dǎo)出位置: + fileName)。 += new PrintPageEventHandler(printDocument1_PrintPage)。 = 。 if ((width / ) (height / )) { width = 。 Pen p = new Pen(, 1f)。如果未能確定出錯(cuò)的具體位置,那么可以通過(guò)Microsoft Visual Studio 2008所提供的單步執(zhí)行的方法對(duì)程序進(jìn)行單步的跟蹤,以確定具體的出錯(cuò)位置。第五章 結(jié) 論經(jīng)過(guò)將近一個(gè)學(xué)期的設(shè)計(jì),基于C多機(jī)聯(lián)合繪圖系統(tǒng)基本開發(fā)完畢。此外,我還要感謝那些在畢業(yè)設(shè)計(jì)過(guò)程中所有支持和幫助我的人。 = false。 if ()//本機(jī)為主機(jī) { = new MyServer()。 。 = 。 = 。附錄1. 初始模塊程序public partial class PreMainForm : Form { public PreMainForm() { InitializeComponent()。本次畢業(yè)設(shè)計(jì)采用的開發(fā)工具是Microsoft Visual Studio 2008,在開發(fā)過(guò)程中更加熟悉了該開發(fā)環(huán)境的使用方法,熟練掌握了一些開發(fā)軟件的技巧,同時(shí)由于本次畢業(yè)設(shè)計(jì)還涉及的內(nèi)容是數(shù)字圖像處理,因而這次的畢業(yè)設(shè)計(jì)使本人對(duì)數(shù)字圖像處理方面的知識(shí)也有了更多的了總之,通過(guò)本次畢業(yè)設(shè)計(jì),進(jìn)一步加深了對(duì)軟件設(shè)計(jì)的掌握,加強(qiáng)了對(duì)Microsoft Visual Studio 2008軟件的使用。此錯(cuò)誤的調(diào)試只能通過(guò)對(duì)個(gè)人的編程思路進(jìn)行檢查,改變自己的編程思路。 (p, myRectangle)。 } else { height = 。 } private void printDocument1_PrintPage(object sender, e) { image = ()。 streamToPrint = new MemoryS