Inkscape Gradient Handles Python API
Greetings from Santiago,
After looking for this information all around the web: (List of 1231 Inkscape verbs) http://www.inkscapeforum.com/viewtopic.php?t=32187 (Inkscape Source code) http://inkscape.sourcearchive.com/documentation/0.48.2-0ubuntu1/structGrDrag...
I decided just asking experts. This is my first post in this mail list.
Does Inkscape Python API provide access to current coordinate points of gradient handles?
Radial gradient handles have three coordinates (similar to an L-shape) and Linear gradient handles shows only two coordinates (drawing a single line)
Does exists a plugin that could draw these handles similar to Visualize Path plugin "draw handles" (handles.py inside Inkscape extensions folder)?
In the forum, I posted a SVG and a PNG Take a look at both attached files: http://www.inkscapeforum.com/viewtopic.php?f=34&t=32784 or copy and paste the SVG code at the end of this message into a new SVG document.
I am using this information for importing SVG files with gradients into my Android Application.
Thanks in advance!
Al
SVG File:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="213.33333" height="213.33333" viewBox="0 0 200 200" id="svg3478" version="1.1" inkscape:version="0.92.1 r15371" sodipodi:docname="200x200_gradients_01.svg"> <defs id="defs3480"> <linearGradient id="linearGradient4326" inkscape:collect="always"> <stop id="stop4328" offset="0" style="stop-color:#0000ff;stop-opacity:1" /> <stop id="stop4330" offset="1" style="stop-color:#00ff00;stop-opacity:0.51764709" /> </linearGradient> <linearGradient inkscape:collect="always" id="linearGradient4296"> <stop style="stop-color:#ff0000;stop-opacity:0.51764709" offset="0" id="stop4298" /> <stop style="stop-color:#ffff00;stop-opacity:1" offset="1" id="stop4300" /> </linearGradient> <radialGradient inkscape:collect="always" xlink:href="#linearGradient4296" id="radialGradient4312" cx="95.666649" cy="987.04877" r="95" gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62319928,0.62388171,-1.0181927,1.0170788,1017.3415,-88.883758)" /> <linearGradient inkscape:collect="always" xlink:href="#linearGradient4326" id="linearGradient4322" x1="10.292649" y1="861.79907" x2="190.29543" y2="1041.7491" gradientUnits="userSpaceOnUse" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.11" inkscape:cx="95.04257" inkscape:cy="120.77776" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" units="px" height="200px" inkscape:window-width="1024" inkscape:window-height="540" inkscape:window-x="-4" inkscape:window-y="-4" inkscape:window-maximized="1" /> <metadata id="metadata3483"> rdf:RDF <cc:Work rdf:about=""> dc:formatimage/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="artwork" inkscape:groupmode="layer" id="layer1" transform="translate(0,-852.3622)" style="display:inline"> <rect
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate" id="rect3486-8" width="200" height="200" x="0" y="852.36218" /> <rect
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4312);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient4322);stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate" id="rect3486" width="180" height="180" x="10" y="862.36218" /> </g> <g inkscape:groupmode="layer" id="layer2" inkscape:label="gradientHandles" style="display:inline"> <path
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.99999994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate" d="M 131.47545,181.7753 72.047652,122.30296 169.2084,25.215022" id="rect4338" inkscape:connector-curvature="0" sodipodi:nodetypes="ccc" /> <path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 10,9.9999957 189.99999,189.99998" id="path4332" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> </g> </svg>
participants (1)
-
Alejandro Tejada