翻譯|使用教程|編輯:李顯亮|2020-05-19 09:30:07.257|閱讀 337 次
概述:在小編看來,CADEditorX是一款非常簡單且實用的CAD文檔查看與編輯器。對于使用小白可能還比較陌生,現在小編為大家整理了一篇《ActiveX從零開始系列操作教程》,從查看到編輯,以及其他功能的使用,供大家學習。本文將講解如何添加圖片以及框中的文本。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
CADEditorX是一個ActiveX組件,用于在支持ActiveX和COM技術的任何開發環境中,將CAD功能添加到網頁或正在開發的應用程序中。同時可以查看、編輯、轉換、打印和測量DWG、DXF、SVG、HPGL、PDF、STEP、IGES、STL和其他CAD文件。
在小編看來,CADEditorX是一款非常簡單且實用的CAD文檔查看與編輯器。對于使用小白可能還比較陌生,現在小編為大家整理了一篇《CADEditorX從零開始系列操作教程》,從查看到編輯,以及其他功能的使用,供大家學習。
圖片存儲在cstImageEnt類中。請根據下面的例子來添加圖片。
<?xml version="1.0" encoding="UTF-8"?> <cadsofttools version="2.0"> <!-- Add entities --> <add> <cstSectionObjects Name="OBJECTS"> <SubEntities> <cstDictionary name="IMAGEDEFS"> <SubEntities> <!-- FileName="Specify the file path" --> <cstImageDef FileName="%SGSAMPLESPATH%\image.jpg" HandleSave="@1"/> </SubEntities> </cstDictionary> </SubEntities> </cstSectionObjects> <!-- Point - insertion point (corresponds to the bottom left corner of the image) --> <!-- Point1 - top left corner in the drawing coordinates (top left corner of the image) --> <!-- Point2 - bottom right corner in the drawing coordinates (bottom right corner of the image) --> <cstImageEnt Point="0,0,0" imagedef="@1"> <Calc mode="0" Point1="0,100,0" Point2="100,0,0"/> </cstImageEnt> <cstImageEnt Point="0,0,0" imagedef="@1"> <Calc mode="1" Width="100" Height="400" Angle="30"/> </cstImageEnt> </add> <fittosize /> </cadsofttools>
有時需要用文本標記圖形。接下來讓我們看看如何在框中創建文本:
下面的代碼示例創建一個矩形,在其中填充陰影并添加文本。
<?xml version="1.0" encoding="UTF-8"?> <!-- Description: Example show how to create text in a box and how to use list of handles. --> <cadsofttools version="2.0"> <!-- Create simple rectangular Solid Hatch. Handle of polyline is saved as "@1" --> <add> <cstLWPolyline HandleSave="@1"> <SubEntities> <cstVertex Point="0,0,0"/> <cstVertex Point="2,0,0"/> <cstVertex Point="2,1,0"/> <cstVertex Point="0,1,0"/> <cstVertex Point="0,0,0"/> </SubEntities> </cstLWPolyline> </add> <!-- Select polyline --> <Select Handle="@1"/> <!-- Create hatch --> <createhatch/> <!-- Set red color, it's index is 1 --> <apply Color="0;1;"/> <add> <!-- Create text in box --> <cstMText Point="0.2,0.6" Height="0.2" TextValue="Text in a box" HandleSave="@2"/> </add> <ShowSelectedEntities/> <!-- Handles can be accepted as a list with ";" separator --> <UnSelect Handle="@1;@2;$24"/> </cadsofttools>
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn