]> _ Git - cubist_util.git/commitdiff
wip #5811 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Mar 2023 17:53:03 +0000 (18:53 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Mar 2023 17:53:03 +0000 (18:53 +0100)
src/CommandLine/Inkscape.php [new file with mode: 0644]

diff --git a/src/CommandLine/Inkscape.php b/src/CommandLine/Inkscape.php
new file mode 100644 (file)
index 0000000..13c8de4
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+namespace Cubist\Util\CommandLine;
+
+use Cubist\Util\CommandLine;
+
+class Inkscape extends CommandLine
+{
+//inkscape -f $1"-stroketopath/"$svgfile --verb="EditSelectAll" --verb="StrokeToPath" --verb="FileSave" --verb="FileQuit"
+
+    public function __construct($output = null, $error = true)
+    {
+        parent::__construct('inkscape', $output, $error);
+    }
+
+    public function openFileAndApplyVerbs($file, $verbs = [])
+    {
+        $this->setArg('f', $file);
+        foreach ($verbs as $verb) {
+            $this->setArg('verb', $verb);
+        }
+    }
+
+    public function strokeToPath($file)
+    {
+        $this->openFileAndApplyVerbs($file, ['EditSelectAll', 'StrokeToPath', 'FileSave', 'FileQuit']);
+    }
+}
\ No newline at end of file