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 View files (119)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-05-13 (7 days ago) RSS 2.0 feedNot enough user ratingsTotal: 15 This week: 5All time: 11,272 This week: 16Up
Version License PHP version Categories
svgcreator 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 is available for providing paid consulting. Contact Stefan Kientzler .
Classes: 19 packages by
Country: Germany Germany
Age: 56
All time rank: 72647 in Germany Germany
Week rank: 15 Up1 in Germany Germany Up
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 - 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

Usage

For usage see the several examples - FilterExample.php - GradientExample.php - MarkerExample.php - PreserveAspectRatio.php - TextLengthAdjust.php

Dosumnetation

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


  Files folder image Files  
File Role Description
Files folder imagedoc (2 files)
Files folder imageimages (4 files)
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 FilterExample.php Example Example script
Accessible without login Plain text file githubwiki.xml Data Auxiliary data
Accessible without login Plain text file GradientExample.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file MarkerExample.php Example Example script
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 PreserveAspectRatio.php Example Example script
Accessible without login Plain text file readme.md Doc. Documentation
Accessible without login Plain text file TextLengthAdjust.php Example Example script

  Files folder image Files  /  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  /  images  
File Role Description
  Accessible without login Image file elephpant.png Icon Icon image
  Accessible without login Plain text file hsg.svg Data Auxiliary data
  Accessible without login Plain text file PhpUnitCoverageBadge.svg Data Auxiliary data
  Accessible without login Plain text file SC_Freiburg.svg Data Auxiliary data

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

  Files folder image Files  /  SKien  /  SVGCreator  
File Role Description
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 (2 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

  Files folder image Files  /  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  /  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  /  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  /  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  /  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  /  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  /  SKien  /  SVGCreator  /  Text  
File Role Description
  Plain text file SVGText.php Class Class source
  Plain text file SVGTextPath.php Class Class source

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

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

  Files folder image Files  /  Tests  /  SKien  /  SVGCreator  
File Role Description
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 (1 file)
Files folder imageText (2 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 SVGTest.php Class Class source

  Files folder image Files  /  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  /  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  /  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  /  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  /  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  /  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  /  Tests  /  SKien  /  SVGCreator  /  testdata  
File Role Description
  Accessible without login Image file elephpant.png Icon Icon image

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:15
This week:5
All time:11,272
This week:16Up