public function __construct() { parent::__construct(); $this->header_set = true; $this->set_style_defaults(); $this->set_class_defaults(); }
public function __construct($cols = 0, $rows = 0, $fixed = false) { parent::__construct(); $this->numcols = $cols; $this->numrows = $rows; $this->fixed = $fixed; }
public function __construct() { parent::__construct(); $this->width = "auto"; $this->height = "auto"; $this->header = ""; $this->content = ""; $this->type = "header1"; }
public function __construct($width, $height, $bgcolor = 'rgba(255,255,255,0)') { parent::__construct($this->createCanvas($width, $height, $bgcolor)); // Set brush color to opaque black $this->color = imagecolorallocate($this->gd, 0, 0, 0); }
function captcha() { Graphics::captcha(125, 50, 4, 'monaco', 'captcha'); }
/** * Put a image * GS v0 m xL xH yL yH d1 ... dk * * @param string $filename * @param intger $width * @param integer $height * @param integer $size resolution relation * @throws RuntimeException */ public function putImage($filename = '', $width = null, $height = null, $size = 0) { try { $img = new Graphics($filename, $width, $height); } catch (RuntimeException $e) { throw new RuntimeException($e->getMessage()); } catch (InvalidArgumentException $e) { throw new RuntimeException($e->getMessage()); } $size = self::validateInteger($size, 0, 3, 0); //get xL xH yL yH $imgHeader = self::dataHeader(array($img->getWidth(), $img->getHeight()), true); //send graphics command to printer $this->buffer->write(self::GS . 'v0' . chr($size) . $imgHeader . $img->getRasterImage()); }
protected function draw() { Graphics::print_string("You have successfully created a game! Now get to work.", 100, 100); }
$app->route('GET /routing', 'Main->routing'); $app->route('GET /openid2', 'Main->openid2'); $app->route('GET /captcha', function () { Graphics::captcha(180, 60, 5); }); $app->route('GET /identicon/@id/@size', function () { Graphics::identicon(f3::get('PARAMS.id'), f3::get('PARAMS.size')); }); $app->route('GET /invert', function () { Graphics::invert('{{@GUI}}test.jpg'); }); $app->route('GET /thumb', function () { Graphics::thumb('{{@GUI}}large.jpg', 256, 192); }, 60); $app->route('GET /screenshot', function () { Graphics::screenshot('http://www.yahoo.com', 150, 200); }); $app->route('GET /google/map', function () { Google::staticmap('Brooklyn Bridge', 12, '256x256'); }); $app->route('GET /minified/@script', function () use($app) { Web::minify($app->get('GUI'), array(f3::get('PARAMS.script'))); }); $app->run(); class Obj { public function hello() { echo 'hello'; } }