>> CADEditorX最新版免费下载 <<

图片存储在cstImageEnt类中。请根据下面的例子来添加图片。

<ml version="1.0" encoding="UTF-8"gt;<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>     

有时需要用文本标记图形。接下来让我们看看如何在框中创建文本:

下面的代码示例创建一个矩形,在其中填充阴影并添加文本。

<ml version="1.0" encoding="UTF-8"gt;   <!-- 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>

是CADSoftTools厂商正式合作商,如果您有任何疑问或需求,请随时联系客服,我们很高兴为您提供查询和咨询
标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2020年4月16日
下一篇 2020年4月16日

相关推荐

发表回复

登录后才能评论