Exemple #1
0
 public function zeichneKoordinatenGitter($GridVisible = true, $XTickDistance = 40, $YTickDistance = 40)
 {
     $koord = new SWFShape();
     $koord->setLine(0, 212, 212, 212);
     $koord->movePenTo(0, 0);
     $koord->drawlineto($this->width - 1, 0);
     $koord->drawlineto($this->width, $this->height - 1);
     $koord->drawlineto(0, $this->height - 1);
     $koord->drawlineto(0, 0);
     $koordtext = new SWFText();
     $t = new SWFFont(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "fonts" . DIRECTORY_SEPARATOR . "FreeSans.fdb");
     $koordtext->setfont($t);
     $koordtext->setColor(212, 212, 212);
     // Skala Striche
     $i = $XTickDistance;
     while ($i < $this->width) {
         $koordtext->moveto($i, 20);
         $koordtext->addString($i);
         if ($GridVisible) {
             $koord->movePenTo($i, 0);
             $koord->drawlineto($i, $this->height);
         } else {
             $koord->movePenTo($i, 0);
             $koord->drawlineto($i, 20);
         }
         $i += $XTickDistance;
     }
     $i = $YTickDistance;
     while ($i < $this->height) {
         $koordtext->moveto(20, $i);
         $koordtext->addString($i);
         if ($GridVisible) {
             $koord->movePenTo(0, $i);
             $koord->drawlineto($this->width, $i);
         } else {
             $koord->movePenTo(0, $i);
             $koord->drawlineto(20, $i);
         }
         $i += $YTickDistance;
     }
     $this->SWFMovie->add($koordtext);
     $this->SWFMovie->add($koord);
     $this->SWFMovie->nextFrame();
 }