include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; include_once '../src/SVGCreator/Elements/Polygon.php'; include_once '../src/SVGCreator/ComplexFigures/ComplexPolygon.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Complex Examples</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $complexElement = new \SVGCreator\ComplexFigures\ComplexPolygon(150, 150, 30, 5, array("fill" => "#6aa84f")); $svg->append($complexElement->getElement()); $complexElement = new \SVGCreator\ComplexFigures\ComplexPolygon(400, 400, 50, 10, array("fill" => "#ff0000")); $svg->append($complexElement->getElement()); $complexElement = new \SVGCreator\ComplexFigures\ComplexPolygon(150, 800, 40, 3, array("fill" => "#00ffff")); $svg->append($complexElement->getElement()); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Group Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $group = new \SVGCreator\Elements\Group(array('id' => 'group1')); $group->append(\SVGCreator\Element::LINE)->attr('x1', 100)->attr('y1', 100)->attr('x2', 325)->attr('y2', 250)->attr('stroke', 'blue'); $circle = new \SVGCreator\Elements\Circle(); $circle->attr('cx', 250)->attr('cy', 140)->attr('fill', 'green')->attr('r', 20)->attr('stroke', 'cyan')->attr('stroke-width', '5px'); $group->append($circle); $svg->append($group); $group = new \SVGCreator\Elements\Group(array('id' => 'group2')); $group->append(\SVGCreator\Element::LINE)->attr('x1', 550)->attr('y1', 300)->attr('x2', 145)->attr('y2', 488)->attr('stroke', 'red'); $svg->append($group); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/SVGException.php'; include_once '../src/SVGCreator/Elements/Rect.php'; include_once '../src/SVGCreator/Elements/Group.php'; include_once '../src/SVGCreator/Elements/Svg.php'; include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; include_once '../src/SVGCreator/Elements/Text.php'; include_once '../src/SVGCreator/Elements/Polygon.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Polygon Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $svg->append(\SVGCreator\Element::POLYGON)->attr('fill', 'red')->attr('stroke', 'blue')->attr('points', '100,200 300,50 400,40')->attr('transform', 'rotate(45,100,200)'); $svg->append(\SVGCreator\Element::CIRCLE)->attr('cx', '50%')->attr('cy', '30%')->attr('fill', 'green')->attr('r', 20)->attr('stroke', 'cyan')->attr('stroke-width', '5px'); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/Element.php'; include_once '../src/SVGCreator/SVGException.php'; include_once '../src/SVGCreator/Elements/Rect.php'; include_once '../src/SVGCreator/Elements/Group.php'; include_once '../src/SVGCreator/Elements/Svg.php'; include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; include_once '../src/SVGCreator/Elements/Text.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Circle Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $svg->append(\SVGCreator\Element::TEXT)->attr('x', 100)->attr('y', 100)->attr('fill', '#ff0000')->text('Just added some text'); $svg->append(\SVGCreator\Element::CIRCLE)->attr('cx', 250)->attr('cy', 140)->attr('fill', 'green')->attr('r', 20)->attr('stroke', 'cyan')->attr('stroke-width', '5px'); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/Element.php'; include_once '../src/SVGCreator/SVGException.php'; include_once '../src/SVGCreator/Elements/Rect.php'; include_once '../src/SVGCreator/Elements/Group.php'; include_once '../src/SVGCreator/Elements/Svg.php'; include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Rect Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $svg->append(\SVGCreator\Element::RECT)->attr('width', 25)->attr('height', 10)->attr('style', 'fill:rgb(0,0,255);')->attr('x', 50)->attr('y', 60); $svg->append(new \SVGCreator\Elements\Rect())->attr('width', 45)->attr('height', 40)->attr('fill', '#ff0000')->attr('x', 300)->attr('y', 250); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/SVGException.php'; include_once '../src/SVGCreator/Elements/Rect.php'; include_once '../src/SVGCreator/Elements/Group.php'; include_once '../src/SVGCreator/Elements/Svg.php'; include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Line Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $svg->append(\SVGCreator\Element::LINE)->attr('x1', 100)->attr('y1', 100)->attr('x2', 325)->attr('y2', 250)->attr('stroke', 'blue'); $circle = new \SVGCreator\Elements\Circle(); $circle->attr('cx', 250)->attr('cy', 140)->attr('fill', 'green')->attr('r', 20)->attr('stroke', 'cyan')->attr('stroke-width', '5px'); $svg->append($circle); echo $svg->getString(); ?> </section> </body> </html>
include_once '../src/SVGCreator/Element.php'; include_once '../src/SVGCreator/SVGException.php'; include_once '../src/SVGCreator/Elements/Rect.php'; include_once '../src/SVGCreator/Elements/Group.php'; include_once '../src/SVGCreator/Elements/Svg.php'; include_once '../src/SVGCreator/Elements/Circle.php'; include_once '../src/SVGCreator/Elements/Marker.php'; include_once '../src/SVGCreator/Elements/Defs.php'; include_once '../src/SVGCreator/Elements/Line.php'; include_once '../src/SVGCreator/Elements/Path.php'; ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Circle Example</title> </head> <body> <section> <?php $attributesSvg = array('width' => 1000, 'height' => 1000); $svg = new \SVGCreator\Elements\Svg($attributesSvg); $svg->append(\SVGCreator\Element::CIRCLE)->attr('cx', 100)->attr('cy', 100)->attr('fill', '#ff0000')->attr('r', 50)->attr('stroke', '#000000')->attr('stroke-width', '5px'); $svg->append(\SVGCreator\Element::CIRCLE)->attr('cx', 250)->attr('cy', 140)->attr('fill', 'green')->attr('r', 20)->attr('stroke', 'cyan')->attr('stroke-width', '5px'); $svg->append($circle); echo $svg->getString(); ?> </section> </body> </html>