Beispiel #1
0
 function __construct($attributes = array())
 {
     $defaults = array();
     $defaults['insbase'] = array(0.0, 0.0, 0.0);
     $defaults['extmin'] = array(0.0, 0.0);
     $defaults['extmax'] = array(0.0, 0.0);
     $defaults['fileName'] = 'test.dxf';
     //$defaults['tdcreate'] = time();
     parent::__construct(array_merge($defaults, $attributes));
     $this->attributes['acadver'] = "9\n\$ACADVER\n1\nAC1009\n";
     //version R14
     $this->blocks = array();
     $this->header = array($this->attributes['acadver']);
     $this->layers = array(new DxfLayer());
     $this->lineTypes = array(new DxfLineType());
     $this->styles = array(new DxfStyle());
     $this->views = array();
     //echo print_r($this->attributes);
 }
Beispiel #2
0
 function __toString()
 {
     return sprintf("0\nBLOCK\n8\n%s\n2\n%s\n70\n%s\n%s3\n%s\n%s\n0\nENDBLK\n", $this->attributes['layer'], strtoupper($this->attributes['name']), $this->attributes['flag'], point($this->attributes['base']), strtoupper($this->attributes['name']), parent::__toString());
 }