本文整理汇总了PHP中Writer::appendLineType方法的典型用法代码示例。如果您正苦于以下问题:PHP Writer::appendLineType方法的具体用法?PHP Writer::appendLineType怎么用?PHP Writer::appendLineType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Writer
的用法示例。
在下文中一共展示了Writer::appendLineType方法的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.
}