inkscape

How to get coordinates of a path from svg file into R

对着背影说爱祢 提交于 2019-12-12 08:13:16
问题 May be it is a silly question but I don't have a lot of experience doing this. I need to get the coordinates from a polygon to create a contour in R. It is a complex polygon of about 1000 points so to input the coordinates manually is crazy. Also I need to extract the xy position of some objects inside the contour. I tried to use Illustrator and Inkscape to create an svg file that contains all the information. It looks like a good option considering that the svg file contains all the

Inkscape extension: python doesn't invoke .exe

坚强是说给别人听的谎言 提交于 2019-12-11 17:13:47
问题 I'm developing a plugin for Inkscape. Some versions: Inkscape v0.92.3 Windows 10, version 1803 (build 17134.165) Python 3.7 explicitly installed MonoDevelop Version 7.7 Preview (7.7) Extra versions below Installation Locations: Inkscape: C:\Program Files\Inkscape Extension: C:\Program Files\Inkscape\share\extensions Contains: myplugin.inx , myplugin.py , MyPlugin.exe I've made a plugin which, for development reasons, works as currently intended. Most important of all, it runs when I run it

How we can calculate the correct x and y value for the rotated image?

戏子无情 提交于 2019-12-11 16:26:22
问题 Mapping SVG image element to html. Image in inkscape rotate counterclockwise 50 degree : <image y="178.3712" x="-212.40982" id="image3002" xlink:href="..path" height="369" width="360" transform="matrix(0.64278761,-0.76604444,0.76604444,0.64278761,0,0)" /> Computing x & y , according to this mathematical logic : X = -212.40982, Y = 178.3712 x = X * 0.64278761 - Y * 0.76604444; y = X * 0.76604444 + Y * 0.64278761; After calculating the x and y when i map the image in html, it looks : Now can

Inkscape moveTo coords way off in Raphael

故事扮演 提交于 2019-12-11 09:16:15
问题 I am trying to copy paths from inkscape into Raphael (individual countries), the problem is the moveTo is way off, how do I make it display on the relatively correct position on the canvas? 回答1: If you're trying to draw a path on a canvas in a relative position, you need to transform all of the absolute coordinates to relative coordinates. I had the same problem recently and resorted to a calculator and paper (it was a short path, and wasn't worth it to attack programatically). There are a

Inkscape - quality loss when using rect with image as pattern compared to just using <image>

这一生的挚爱 提交于 2019-12-11 06:28:41
问题 So basically I use a png image in two different versions. First by just opening it in Inkscape and storing it as svg, for the second by clicking "convert to pattern" and then storing as svg. The first looks like this in the file: <image width="1280" height="720" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBOR..." id="image10" x="0" y="0" /> and the second like this: <defs id="defs6"> <pattern patternUnits="userSpaceOnUse" width="1280" height="720" id="pattern4157"> <image y

Using the Inkscape shell from perl

半世苍凉 提交于 2019-12-11 00:04:40
问题 Inkscape has a shell mode invoked like this inkscape --shell where you can execute commands like this: some_svg_file.svg -e some_png_output.png -y 1.0 -b #ffffff -D -d 150 which will generate a PNG file, or like this: /home/simone/some_text.svg -S which gives you the bounding box of all elements in the file in the return message like this svg2,0.72,-12.834,122.67281,12.942 layer1,0.72,-12.834,122.67281,12.942 text2985,0.72,-12.834,122.67281,12.942 tspan2987,0.72,-12.834,122.67281,12.942 The

Calling Inkscape in Python [duplicate]

喜欢而已 提交于 2019-12-10 13:55:26
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Calling an external command in Python I am trying to convert SVG files to PDFs in Python. I want to use Inkscape for this. How can I call Inkscape in Python ? 回答1: If you don't need to communicate with the process at all, this should do just fine: import subprocess p=subprocess.call(['program','arg1','arg2','arg3', ...]) 来源: https://stackoverflow.com/questions/11651826/calling-inkscape-in-python

Inkscape - Not fully converting png into svg

試著忘記壹切 提交于 2019-12-10 10:22:10
问题 I opened one PNG file in Inkscape and exported it as SVG. When I opened that file with notepad I came to know that the PNG file is embedded within it. If the conversion happened then the resulting file should have only SVG related tags. It shouldn't embed the image within it. Or Am I doing anything wrong. Note: Save as option also producing the same kind of file. I am using Inkscape version 0.48 in Windows 7 - 64 bit. 回答1: A .png file is a raster image file. In order to convert it to a vector

Convert DXF to SVG in Inkscape CLI while keeping layers

坚强是说给别人听的谎言 提交于 2019-12-10 09:39:58
问题 In the Inkscape GUI, there is this awesome feature, that lets me 'save as -> file type -> layers as individual SVGs' (the last one at the bottom). Is there any way of doing the same thing from the CLI? What I have so far: inkscape -z -l output.svg input.dxf This converts the 'input.dxf' to 'output.svg', but I can't find the layers within this SVG. 回答1: With help of the Inkscape community (special thanks to @rindolf), I could come up with a solution. Prerequisites Python 2.7 (It won't work on

Inkscape screws up EPS files

倖福魔咒の 提交于 2019-12-09 17:28:12
问题 I have been trying to use Inkscape to prepare artwork graphics for my scientific papers. I use LaTeX, and I need my figures to be prepared as high-quality Encapsulated PostScript (EPS) images. The work order is as follows. First, I plot parts of my figure using matplotlib and save them in EPS format. Second, I launch Inkscape and import the EPS files. Using Inkscape I compose a figure, leaving needed objects, killing unneeded, and adding some markups. So I used to do when I worked with