public function setUp()
 {
     parent::setUp();
     if (!ezcBaseFeatures::hasExtensionSupport('cairo_wrapper')) {
         $this->markTestSkipped('This test needs pecl/cairo_wrapper support.');
     }
     static $i = 0;
     $this->tempDir = $this->createTempDir(__CLASS__ . sprintf('_%03d_', ++$i)) . '/';
     $this->basePath = dirname(__FILE__) . '/data/';
     $this->driver = new ezcGraphCairoDriver();
     $this->driver->options->width = 200;
     $this->driver->options->height = 100;
     $this->driver->options->font->path = $this->basePath . 'font.ttf';
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     if (!ezcBaseFeatures::hasExtensionSupport('gd') && (ezcBaseFeatures::hasFunction('imagefttext') || ezcBaseFeatures::hasFunction('imagettftext'))) {
         $this->markTestSkipped('This test needs ext/gd with native ttf support or FreeType 2 support.');
     }
     static $i = 0;
     $this->tempDir = $this->createTempDir(__CLASS__ . sprintf('_%03d_', ++$i)) . '/';
     $this->basePath = dirname(__FILE__) . '/data/';
     $this->driver = new ezcGraphGdDriver();
     $this->driver->options->width = 200;
     $this->driver->options->height = 100;
     $this->driver->options->font->path = $this->basePath . 'font.ttf';
     $this->driver->options->supersampling = 1;
 }