熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

用C#對Illustrator矢量圖形軟件進行編程[2]

2013-11-13 11:06:36  來源: .NET編程 

  第四步: 雙擊剛才加入的按鈕進入C#代碼編輯:

private void btnAI_Demo_Click(object sender EventArgs e)
{
     //代碼區
}

  在代碼區內加入以下代碼:     

  IllustratorApplication app = new IllustratorApplication();
            IllustratorDocument doc = appDocumentsAdd(IllustratorAiDocumentColorSpaceaiDocumentCMYKColor );

            IllustratorTextFrame textFrame = docTextFramesAdd();
            object[] position = new object[] { };
            textFramePosition = position;
            textFrameContents = BrawDrawCom;
            textFrameHeight = ;
            textFrameWidth = docWidth;
            textFrameCreateOutline();

            appActiveDocumentClose(IllustratorAiSaveOptionsaiPromptToSaveChanges);

  第五步: 按F進入調試出現窗體界面後點擊測試AI編程按鈕此時會出現兩種情況

  ()在已開啟Adobe Illustrator矢量繪圖軟件時會出現如下界面 


 

[]  []  []  


From:http://tw.wingwit.com/Article/program/net/201311/15176.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.