當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。