PHP Classes

How to Implement a PHP SVG Generator Using the Package SVG Creator: Compose vectorial graphics and generate SVG files

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-21 (Yesterday) RSS 2.0 feedNot enough user ratingsTotal: 18 This week: 2All time: 11,305 This week: 27Up
Version License PHP version Categories
svgcreator 1.1.0GNU General Publi...8.1Graphics, Files and Folders, PHP 7
Description 

Author

This package can compose vectorial graphics and generate SVG files.

It provides several classes that can compose an XML document with the structure of an SVG document with several types of vectorial graphic elements.

The main SVG class can return a string with the SVG document in XML format to a string or a file.

Currently it supports the SVG vectorial graphic elements:

- Comments

- Groups

- Text

- Text path

- Circle

- Ellipse

- Line

- Path

- Poligon

- Polyline

- Rectangle

- Shape

- Linear gradient

- Stop gradient

- Radial gradient

- Blend filter

- Drop shadow filter

- Flood filter

- Gaussian filter

- Offset filter

Picture of Stefan Kientzler
  Performance   Level  
Name: Stefan Kientzler <contact>
Classes: 19 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 11x

Winner: 6x

Details

SVGCreator

Latest Stable Version License Donate Minimum PHP Version PhpUnit coverage

Overview

This package can compose vectorial graphics and generate SVG files.

It provides several classes that can compose an XML document with the structure of an SVG document with several types of vectorial graphic elements. The main SVG class can return a string with the SVG document in XML format to a string or a file.

Currently it supports the SVG vectorial graphic elements: - Core elements - Comments - Groups - Images - Symbols - Text elements - Text - Text path - Shapes - Circle - Ellipse - Line - Path - Poligon - Polyline - Rectangle - Filter - Blend filter - Drop shadow filter - Flood filter - Gaussian filter - Offset filter - Gradients - Linear gradient - Stop gradient - Radial gradient - Marker - ArrowMarker - BasicMarker - Extended shapes - Blockarrow - Star

Usage

For usage see the several examples in the './examples' directory

Documentation

A full documentation can be found in the Wiki at GitHub.com


  Files folder image Files (134)  
File Role Description
Files folder imagedoc (2 files)
Files folder imageexamples (8 files, 2 directories)
Files folder imageSKien (1 directory)
Files folder imageTests (1 directory)
Accessible without login Plain text file autoloader.php Aux. Auxiliary script
Accessible without login Plain text file clover.xml Data Auxiliary data
Accessible without login Plain text file coverage.txt Doc. Documentation
Accessible without login Plain text file githubwiki.xml Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file PhpUnitCoverageBadge.php Example Example script
Accessible without login Plain text file PhpUnitCoverageBadge.svg Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation
Accessible without login HTML file SVGPlayground.html Doc. Documentation

  Files folder image Files (134)  /  doc  
File Role Description
  Accessible without login Image file preserveAspectRatio.png Data Auxiliary data
  Accessible without login Plain text file SVGReference.md Doc. Documentation

  Files folder image Files (134)  /  examples  
File Role Description
Files folder imagefonts (1 file)
Files folder imageimages (1 file)
  Accessible without login Plain text file BlockArrowExample.php Example Example script
  Accessible without login Plain text file DartBoard.php Example Example script
  Accessible without login Plain text file FilterExample.php Example Example script
  Accessible without login Plain text file FontExample.php Example Example script
  Accessible without login Plain text file GradientExample.php Example Example script
  Accessible without login Plain text file MarkerExample.php Example Example script
  Accessible without login Plain text file PreserveAspectRatio.php Example Example script
  Accessible without login Plain text file TextLengthAdjust.php Example Example script

  Files folder image Files (134)  /  examples  /  fonts  
File Role Description
  Accessible without login Plain text file Liberation.svg Data Auxiliary data

  Files folder image Files (134)  /  examples  /  images  
File Role Description
  Accessible without login Image file elephpant.png Icon Icon image

  Files folder image Files (134)  /  SKien  
File Role Description
Files folder imageSVGCreator (8 files, 7 directories)

  Files folder image Files (134)  /  SKien  /  SVGCreator  
File Role Description
Files folder imageExtShapes (3 files)
Files folder imageFilter (7 files, 1 directory)
Files folder imageGradients (5 files)
Files folder imageHelper (2 files)
Files folder imageMarker (3 files)
Files folder imageShapes (9 files)
Files folder imageText (3 files)
  Plain text file SVG.php Class Class source
  Plain text file SVGAttributesTrait.php Class Class source
  Plain text file SVGCData.php Class Class source
  Plain text file SVGComment.php Class Class source
  Plain text file SVGElement.php Class Class source
  Plain text file SVGGroup.php Class Class source
  Plain text file SVGImage.php Class Class source
  Plain text file SVGSymbol.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  ExtShapes  
File Role Description
  Plain text file SVGBlockArrow.php Class Class source
  Plain text file SVGBlockArrowDef.php Class Class source
  Plain text file SVGStar.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Filter  
File Role Description
Files folder imageEffects (14 files)
  Plain text file SVGBlurShadowFilter.php Class Class source
  Plain text file SVGCamouflageFilter.php Class Class source
  Plain text file SVGDropShadowFilter.php Class Class source
  Plain text file SVGFilter.php Class Class source
  Plain text file SVGRoughplasterFilter.php Class Class source
  Plain text file SVGSaturationFilter.php Class Class source
  Plain text file SVGWoodFilter.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Filter  /  Effects  
File Role Description
  Plain text file SVGBlendEffect.php Class Class source
  Plain text file SVGColorMatrixEffect.php Class Class source
  Plain text file SVGComponentTransferEffect.php Class Class source
  Plain text file SVGCompositeEffect.php Class Class source
  Plain text file SVGDiffuseLightingEffect.php Class Class source
  Plain text file SVGDropShadowEffect.php Class Class source
  Plain text file SVGEffect.php Class Class source
  Plain text file SVGFloodEffect.php Class Class source
  Plain text file SVGGaussianBlurEffect.php Class Class source
  Plain text file SVGLightingEffect.php Class Class source
  Plain text file SVGMergeEffect.php Class Class source
  Plain text file SVGOffsetEffect.php Class Class source
  Plain text file SVGSpecularLightingEffect.php Class Class source
  Plain text file SVGTurbulenceEffect.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Gradients  
File Role Description
  Plain text file SVGGradient.php Class Class source
  Plain text file SVGGradientStop.php Class Class source
  Plain text file SVGLinearGradient.php Class Class source
  Plain text file SVGRadialGradient.php Class Class source
  Plain text file SVGSimpleGradient.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Helper  
File Role Description
  Plain text file Attrib.php Class Class source
  Plain text file Style.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Marker  
File Role Description
  Plain text file SVGArrowMarker.php Class Class source
  Plain text file SVGBasicMarker.php Class Class source
  Plain text file SVGMarker.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Shapes  
File Role Description
  Plain text file SVGCircle.php Class Class source
  Plain text file SVGEllipse.php Class Class source
  Plain text file SVGLine.php Class Class source
  Plain text file SVGPath.php Class Class source
  Plain text file SVGPolygon.php Class Class source
  Plain text file SVGPolyline.php Class Class source
  Plain text file SVGPolyTrait.php Class Class source
  Plain text file SVGRect.php Class Class source
  Plain text file SVGShape.php Class Class source

  Files folder image Files (134)  /  SKien  /  SVGCreator  /  Text  
File Role Description
  Plain text file SVGFont.php Class Class source
  Plain text file SVGText.php Class Class source
  Plain text file SVGTextPath.php Class Class source

  Files folder image Files (134)  /  Tests  
File Role Description
Files folder imageSKien (1 file, 1 directory)

  Files folder image Files (134)  /  Tests  /  SKien  
File Role Description
Files folder imageSVGCreator (7 files, 8 directories)
  Plain text file TestCaseAccessHelperTrait.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  
File Role Description
Files folder imageExtShapes (2 files)
Files folder imageFilter (7 files, 1 directory)
Files folder imageGradients (5 files)
Files folder imageHelper (2 files)
Files folder imageMarker (3 files)
Files folder imageShapes (9 files)
Files folder imagetestdata (4 files)
Files folder imageText (3 files)
  Plain text file SVGCDataTest.php Class Class source
  Plain text file SVGCommentTest.php Class Class source
  Plain text file SVGElementTest.php Class Class source
  Plain text file SVGGroupTest.php Class Class source
  Plain text file SVGImageTest.php Class Class source
  Plain text file SVGSymbolTest.php Class Class source
  Plain text file SVGTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  ExtShapes  
File Role Description
  Plain text file SVGBlockArrowTest.php Class Class source
  Plain text file SVGStarTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Filter  
File Role Description
Files folder imageEffects (14 files)
  Plain text file SVGBlurShadowFilterTest.php Class Class source
  Plain text file SVGCamouflageFilterTest.php Class Class source
  Plain text file SVGDropShadowFilterTest.php Class Class source
  Plain text file SVGFilterTest.php Class Class source
  Plain text file SVGRoughplasterFilterTest.php Class Class source
  Plain text file SVGSaturationFilterTest.php Class Class source
  Plain text file SVGWoodFilterTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Filter  /  Effects  
File Role Description
  Plain text file SVGBlendEffectTest.php Class Class source
  Plain text file SVGColorMatrixEffectTest.php Class Class source
  Plain text file SVGComponentTransferEffectTest.php Class Class source
  Plain text file SVGCompositeEffectTest.php Class Class source
  Plain text file SVGDiffuseLightingEffectTest.php Class Class source
  Plain text file SVGDropShadowEffectTest.php Class Class source
  Plain text file SVGEffectTest.php Class Class source
  Plain text file SVGFloodEffectTest.php Class Class source
  Plain text file SVGGaussianBlurEffectTest.php Class Class source
  Plain text file SVGLightingEffectTest.php Class Class source
  Plain text file SVGMergeEffectTest.php Class Class source
  Plain text file SVGOffsetEffectTest.php Class Class source
  Plain text file SVGSpecularLightingEffectTest.php Class Class source
  Plain text file SVGTurbulenceEffectTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Gradients  
File Role Description
  Plain text file SVGGradientStopTest.php Class Class source
  Plain text file SVGGradientTest.php Class Class source
  Plain text file SVGLinearGradientTest.php Class Class source
  Plain text file SVGRadialGradientTest.php Class Class source
  Plain text file SVGSimpleGradientTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Helper  
File Role Description
  Plain text file AttribTest.php Class Class source
  Plain text file StyleTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Marker  
File Role Description
  Plain text file SVGArrowMarkerTest.php Class Class source
  Plain text file SVGBasicMarkerTest.php Class Class source
  Plain text file SVGMarkerTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Shapes  
File Role Description
  Plain text file SVGCircleTest.php Class Class source
  Plain text file SVGEllipseTest.php Class Class source
  Plain text file SVGLineTest.php Class Class source
  Plain text file SVGPathTest.php Class Class source
  Plain text file SVGPolygonTest.php Class Class source
  Plain text file SVGPolylineTest.php Class Class source
  Plain text file SVGPolyTraitTest.php Class Class source
  Plain text file SVGRectTest.php Class Class source
  Plain text file SVGShapeTest.php Class Class source

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  testdata  
File Role Description
  Accessible without login Image file elephpant.png Icon Icon image
  Accessible without login Plain text file Liberation.svg Data Auxiliary data
  Accessible without login Plain text file LiberationMissingA.svg Data Auxiliary data
  Accessible without login Plain text file LiberationMissingANoMissingGlyph.svg Data Auxiliary data

  Files folder image Files (134)  /  Tests  /  SKien  /  SVGCreator  /  Text  
File Role Description
  Plain text file SVGFontTest.php Class Class source
  Plain text file SVGTextPathTest.php Class Class source
  Plain text file SVGTextTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:2
All time:11,305
This week:27Up