Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Geometry IDML:形状如何存储在IDML文件中?_Geometry_Idml - Fatal编程技术网

Geometry IDML:形状如何存储在IDML文件中?

Geometry IDML:形状如何存储在IDML文件中?,geometry,idml,Geometry,Idml,我在阅读IDML时遇到了多个形状。每个形状都有自己的几何图形,看起来像- -<PathGeometry> -<GeometryPathType PathOpen="false"> -<PathPointArray> <PathPointType RightDirection="-611.5 1548.5" LeftDirection="-611.5 1548.5" Anchor="-611.5 1548.5"/

我在阅读IDML时遇到了多个形状。每个形状都有自己的几何图形,看起来像-

-<PathGeometry> 
   -<GeometryPathType PathOpen="false"> 
      -<PathPointArray> 
          <PathPointType RightDirection="-611.5 1548.5" LeftDirection="-611.5 1548.5" Anchor="-611.5 1548.5"/> 
          <PathPointType RightDirection="-611.5 2339.5" LeftDirection="-611.5 2339.5" Anchor="-611.5 2339.5"/>
          <PathPointType RightDirection="-533.3 2339.5" LeftDirection="-533.3 2339.5" Anchor="-533.3 2339.5"/> 
          <PathPointType RightDirection="-533.3 1548.5" LeftDirection="-533.3 1548.5" Anchor="-533.3 1548.5"/> 
       </PathPointArray> 
   </GeometryPathType>
 </PathGeometry>
-
- 
- 
对于矩形,它很简单(如上面的示例所示),其中
元素中的每个属性都指向矩形中的一个端点。其他形状会发生什么?换句话说,RightDirection、LeftDirection和Anchor属性表示什么?有没有办法确定它在PathPointArray上看到的是什么形状


谢谢。

每个IDML
PathPointType
都是立方体上的一个节点。控制点和定位点的组合定义了直线的端点和曲率。IDML中的所有直线都定义为曲线,但正如您所注意到的,直线的控制点和定位点是相同的。直线多边形(如三角形)的定义方式相同

只有一小部分形状类型(矩形、椭圆、图形线、多边形-参见规范中的10.3.1)。只需一次画一条线,就可以从IDML中绘制任何形状,但为矩形和椭圆创建单独的例程更有效


还要注意
GeometryPathType
元素上的
PathOpen=“false”
。为了提高效率,形状中的最后一行没有定义-如果
PathOpen
==false,您将创建一条从最后一点到第一点的直线。

再次感谢JcFx!!:)