Пример #1
0
 public function drawCircle(Circle $circ, array $options = array())
 {
     $pointO = $this->drawPoint($circ->getPointO(), $options);
     $tmp_point1 = new Point($circ->getPointO()->getAbscissa() + $circ->getRadius(), $circ->getPointO()->getOrdinate());
     $point1 = $this->drawPoint($tmp_point1, array_merge($options, $this->getOptionsByPrefix(self::CIRCLE_POINT_PREFIX)));
     $data = json_encode(array_merge($options, $this->getOptionsByPrefix(self::CIRCLE_PREFIX)), JSON_NUMERIC_CHECK);
     $name_circle = 'circ' . uniqid();
     $this->addOutput("var {$name_circle} = {$this->_brd}.create('circle', [{$pointO},{$point1}], {$data});");
     return $name_circle;
 }
Пример #2
0
 /**
  * Test if a point is on the external circle of the disc
  *
  * @param   \Maths\PointInterface   $a
  * @return  bool
  */
 public function isValidCirclePoint(PointInterface $a)
 {
     return (bool) parent::isValidPoint($a);
 }