text() public method

Create text within the an SVG image object.
public text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = 'Arial', integer | string $rotate = null, boolean $bold = false ) : Svg
$str string
$size integer | string
$x integer | string
$y integer | string
$font string
$rotate integer | string
$bold boolean
return Svg
Exemplo n.º 1
0
 public function testText()
 {
     $s = new Svg('graph.svg', '640px', '480px');
     $s->setFillColor(new Rgb(255, 0, 0));
     $s->text('Hello World', 36, 10, 100, 'Arial', 10, true);
     $this->assertEquals(640, $s->getWidth());
 }