diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-09-27 08:51:26 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-09-27 08:51:26 +0000 |
| commit | f9ec83dbb254701f39d3b7a30c0bacb5eaae9ee9 (patch) | |
| tree | 418ef3aa31bf3a219fed44b6bb13a9bf04f9c6ec /src/sp-factory.cpp | |
| parent | Remove unused variable. (diff) | |
| download | inkscape-f9ec83dbb254701f39d3b7a30c0bacb5eaae9ee9.tar.gz inkscape-f9ec83dbb254701f39d3b7a30c0bacb5eaae9ee9.zip | |
Rename <mesh> to <meshgradient> per SVG 2 CR specificiation.
Note: <mesh> has been repurposed to be a special shape that tightly wraps a mesh gradient.
(bzr r15137)
Diffstat (limited to 'src/sp-factory.cpp')
| -rw-r--r-- | src/sp-factory.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/sp-factory.cpp b/src/sp-factory.cpp index 62af684a2..f98291378 100644 --- a/src/sp-factory.cpp +++ b/src/sp-factory.cpp @@ -36,7 +36,7 @@ #include "sp-linear-gradient.h" #include "sp-marker.h" #include "sp-mask.h" -#include "sp-mesh.h" +#include "sp-mesh-gradient.h" #include "sp-mesh-patch.h" #include "sp-mesh-row.h" #include "sp-metadata.h" @@ -154,8 +154,12 @@ SPObject *SPFactory::createObject(std::string const& id) ret = new SPGuide; else if (id == "svg:hatch") ret = new SPHatch; - else if (id == "svg:hatchPath") + else if (id == "svg:hatchpath") ret = new SPHatchPath; + else if (id == "svg:hatchPath") { + std::cerr << "Warning: <hatchPath> has been renamed <hatchpath>" << std::endl; + ret = new SPHatchPath; + } else if (id == "svg:image") ret = new SPImage; else if (id == "svg:g") @@ -168,8 +172,17 @@ SPObject *SPFactory::createObject(std::string const& id) ret = new SPMarker; else if (id == "svg:mask") ret = new SPMask; - else if (id == "svg:mesh") - ret = new SPMesh; + else if (id == "svg:mesh") { // SVG 2 old + ret = new SPMeshGradient; + std::cerr << "Warning: <mesh> has been renamed <meshgradient>." << std::endl; + std::cerr << "Warning: <mesh> has been repurposed as a shape that tightly wraps a <meshgradient>." << std::endl; + } + else if (id == "svg:meshGradient") { // SVG 2 old + ret = new SPMeshGradient; + std::cerr << "Warning: <meshGradient> has been renamed <meshgradient>" << std::endl; + } + else if (id == "svg:meshgradient") // SVG 2 + ret = new SPMeshGradient; else if (id == "svg:meshpatch") ret = new SPMeshpatch; else if (id == "svg:meshrow") @@ -198,7 +211,11 @@ SPObject *SPFactory::createObject(std::string const& id) ret = new SPRoot; else if (id == "svg:script") ret = new SPScript; - else if (id == "svg:solidColor") + else if (id == "svg:solidColor") { + ret = new SPSolidColor; + std::cerr << "Warning: <solidColor> has been renamed <solidcolor>" << std::endl; + } + else if (id == "svg:solidcolor") ret = new SPSolidColor; else if (id == "spiral") ret = new SPSpiral; |
