Download the PHP package the-bit-bang/php-svg-framework-svgf without Composer
On this page you can find all versions of the php package the-bit-bang/php-svg-framework-svgf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download the-bit-bang/php-svg-framework-svgf
More information about the-bit-bang/php-svg-framework-svgf
Files in the-bit-bang/php-svg-framework-svgf
Package php-svg-framework-svgf
Short Description Provides funtionality for creating, reading, modifying and writing svg files in php
License MIT
Informations about the package php-svg-framework-svgf
SVGF: SVG Framework for PHP
SVGF (Scalable Vector Graphics Framework) is a PHP library for creating and modifying SVG files.
It is composed of:
- A PHP implementation of the Scalable Vector Graphics (SVG) 1.1 specification.
- A PHP implementation of the Document Object Model (DOM) Level 2 Style Specification.
- Additional functionality for the SVG element manipulation.
Extended functionality
These are the main functionalities provided by SVGF:
- Read and write SVG files.
- Programatically modify the attributes of the elements in compliance with the (SVG) 1.1 specification.
- Programatically modify the style attribute in compliance with the (DOM) Level 2 Style Specification.
- Access SVG elements using XPath.
- Programatically create SVG basic shapes.
- Programatically create SVG texts.
- Programatically align SVG elements.
- Draw preset connectors between points and elements
Usage
Create SVG files
Create SVG with size A4 (portrait orientation)
Create SVG with size A4 using SVGF (portrait orientation)
Create SVG with size A4 using SVGF (landscape orientation)
or
Create SVG with size Full HD
Create SVG with size Full HD using SVGF
SVGF predefined sizes
- A0, A1, A2, A3, A4, A5
- ARCH_A, ARCH_B, ARCH_C, ARCH_D, ARCH_E
- ICON_16X16, ICON_32X32, ICON_48X48
- VGA, SVGA, XGA, HD, FHD, QHD, UHD, 8K
Read existing SVG files
Create basic shapes
Create rectangle using methods
Create rectangle setting values
Create rectangle using SVGF
Create circle using methods
Create circle setting values
Create circle using SVGF
Apply style
Apply style setting individual properties
Apply style setting style as string with properties and values
Apply style from SVGF
Align SVG elements
Source svg file used to illustrate align functionalities:
Align to center
Align to center with offset
Align to sides
Position on sides
Position on sides with offset
Access SVG elements using XPath
Source svg file used to illustrate xpath functionalities:
To get the DOM representation:
Select elements by id
Select elements by tag name
Select child elements
Select elements by attribute value
Select elements by style setting
Select parent element
Create texts
Create text
Create text using SVGF
Create text with style properties
Create text with style properties using SVGF
Align texts using SVGF
Note: The file containing the TrueType font must be located in the same folder
Align texts to edges of element
Align texts with offset
Draw connectors
Source php code to create the markers used to illustrate connectors:
Draw connectors between points
Draw connectors of different stroke widths between points
The marker size will automatically adjust to the stroke size of the path