Exemplo n.º 1
0
 protected function drawBodyLabel($x, $y, $options)
 {
     if (isset($options['labelGrahaFont'])) {
         $this->Renderer->setOptions($options['labelGrahaFont']);
     }
     $bodyLabelPoints = $this->Chakra->getBodyLabelPoints($this->options);
     foreach ($bodyLabelPoints as $body => $point) {
         if (!array_key_exists($body, Graha::$graha) && isset($options['labelExtraFont'])) {
             $this->Renderer->setOptions($options['labelExtraFont']);
         }
         $bodyLabel = $this->getBodyLabel($body, ['labelGrahaType' => $this->options['labelGrahaType'], 'labelGrahaCallback' => $this->options['labelGrahaCallback']]);
         $this->Renderer->drawText($bodyLabel, $point['x'] + $x, $point['y'] + $y, ['textAlign' => $point['textAlign'], 'textValign' => $point['textValign']]);
     }
 }
Exemplo n.º 2
0
 /**
  * Draw text.
  * 
  * @param string $text
  * @param int $x
  * @param int $y
  * @param null|array $options Options to set (optional)
  */
 public function drawText($text, $x, $y, array $options = null)
 {
     $this->Renderer->drawText($text, $x, $y, $options);
 }