File: example/filterGaussian.php

Recommend this page to a friend!
  Classes of Edgar Asatryan  >  PHP SVG Magick Library  >  example/filterGaussian.php  >  Download  
File: example/filterGaussian.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP SVG Magick Library
Compose vectorial graphics in SVG format
Author: By
Last change:
Date: 3 years ago
Size: 525 bytes
 

 

Contents

Class file image Download
<?php
use nstdio\svg\container\SVG;
use
nstdio\svg\shape\Circle;
use
nstdio\svg\text\Text;

require_once
__DIR__ . '/../vendor/autoload.php';

$stDev = isset($_GET['std']) ? $_GET['std'] : 2;
$svg = new SVG(400, 300);
$svg->viewBox = "0 0 400 300";

$circle = new Circle($svg, 200, 150, 80);
$circle->fill = "#3498db";

$circle->filterGaussianBlur($stDev);
$svg->append($circle);

$text = new Text($svg, "Specify blur amount by passing \"std\" in query");
$text->x = 50;
$text->y = 30;
$svg->append($text);
echo
$svg->draw();


For more information send a message to info at phpclasses dot org.