当前位置: 首页>>代码示例>>PHP>>正文


PHP Writer::appendStyle方法代码示例

本文整理汇总了PHP中Writer::appendStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Writer::appendStyle方法的具体用法?PHP Writer::appendStyle怎么用?PHP Writer::appendStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Writer的用法示例。


在下文中一共展示了Writer::appendStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testFullOutput

 public function testFullOutput()
 {
     $writer = new Writer();
     $b = new Block(array('name' => 'test'));
     $b->append(new Solid(array('points' => array(array(0, 0), array(1, 0), array(1, 1), array(0, 1)), 'color' => 1)));
     $b->append(new Arc(array('center' => array(1, 0), 'color' => 2)));
     $writer->appendBlock($b);
     $writer->appendStyle(new Style());
     $writer->appendView(new View(array('name' => 'Normal')));
     $writer->appendView(View::byWindow('Window', array(1, 0), array(2, 1)));
     $writer->appendLineType(new LineType(array('name' => 'DASHED', 'description' => '- - -', 'elements' => array(array('length' => 0.8), array('length' => -0.2)))));
     $writer->append(new Circle(array('center' => array(1, 1), 'color' => 3)));
     $writer->append(new Face(array('points' => array(array(0, 0), array(1, 0), array(1, 1), array(0, 1)), 'color' => 4)));
     $writer->append(new Insert(array('name' => 'test', 'point' => array(3, 3), 'cols' => 5, 'colspacing' => 2)));
     $writer->append(new Line(array('lineType' => 'DASHED', 'points' => array(array(0, 0), array(5, 5)))));
     /*
     $writer->append(new LwPolyLine(array('points'=>array(array(0, 0),
     										array(1, 0),
     										array(1, 1),
     										array(0, 1)),
                 				'flag'=>129,
                 				'layer' => "Writer",
                 				'color'=>7,
                 				'width'=>1,
                 				'lineType'=>'CONTINUOUS',
                 				'lineWeight' => 0)
     ));
     */
     $writer->append(new PolyLine(array('points' => array(array(1, 1), array(20, 10), array(20, 20), array(1, 15)), 'lineType' => 'DASHED', 'flag' => 0)));
     $writer->append(new Point(array('point' => array(1, 1), 'color' => 1)));
     $writer->append(new Solid(array('points' => array(array(4, 4), array(5, 4), array(7, 8), array(9, 9)), 'color' => 3)));
     $writer->append(new Text(array('text' => 'Testing testing!', 'point' => array(3, 0))));
     $filePath = sys_get_temp_dir() . "/test.dxf";
     $writer->saveAs($filePath);
     $this->assertFileExists($filePath);
     // TODO: Test contents of file.
 }
开发者ID:g105b,项目名称:dxfwriter,代码行数:37,代码来源:Output.test.php


注:本文中的Writer::appendStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。