Hexagon grid without clone for on screen keyboard layout

Post questions on how to use or achieve an effect in Inkscape.
aka.bugle
Posts: 3
Joined: Wed Jan 23, 2008 11:50 pm

Hexagon grid without clone for on screen keyboard layout

Postby aka.bugle » Thu Jan 24, 2008 12:28 am

I'm creating an onscreen keyboard layout, that needs tiled hexagon shaped keys all the same size on a page layout that is 294 x 98 px.
From what I understand, a cloned object does not map its vectors directly in a .svg file.
So I need a method of (perl script?) drawing the same size hexagon to all the positions of the example layout, with out moving the objects or changing their size (no transformations). The On screen keyboard script will only recognize geometric shapes other than rectangle, if they are in there originally drawn position. (This is because instead of transforming the points it creates a transform element for the object in the SVG to move the original points at creation to the new points?)
Are there any scripts to edit the xml to reflect the true position of the cloned hexagon objects?
Could I create a grid and snap stamps of the original to intersections of the grid? or would that also produce clones?

Image

key labels are added later by the keyboards configuration file that translates .svg files object ID# to key function
Image

These images aren't the actual .svg files but just bitmap representations.
~aka.bugle

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Hexagon grid without clone for on screen keyboard layout

Postby prkos » Thu Jan 24, 2008 12:53 am

Maybe Unlink Clone does what you want (Shift + Alt + D)
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

aka.bugle
Posts: 3
Joined: Wed Jan 23, 2008 11:50 pm

Re: Hexagon grid without clone for on screen keyboard layout

Postby aka.bugle » Thu Jan 24, 2008 1:05 am

Thanks, but that has no effect...
on one star (hexagon) object... no clones to unlink in this selection

selecting all the hexagons... same... no Clones to unlink in this selection

~aka.bugle

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: Hexagon grid without clone for on screen keyboard layout

Postby RobA » Thu Jan 24, 2008 3:02 am

All methods: cop and paste, stamp, clone (+unlink) create the new instances of the shape using a translate()

One option would be to convert them all to paths. This collapses all transformation into the node coordinates, and you would have the absolute values in the 'd' attribute.

Alternately, you could create a python script to zero out the translate coordinates and add them to the location coordinates. The difficulty is that every object is handled differently - circles, polygons and spirals use sodipodi:cx and cy, rextangles use x and y, and paths just change the node information, as mentioned earlier.

Can't you just use the transform information and apply that to key labels?

-Rob A>

aka.bugle
Posts: 3
Joined: Wed Jan 23, 2008 11:50 pm

Re: Hexagon grid without clone for on screen keyboard layout

Postby aka.bugle » Thu Jan 24, 2008 4:33 am

ffaat wrote:All methods: cop and paste, stamp, clone (+unlink) create the new instances of the shape using a translate()

As I suspected, thank you.

One option would be to convert them all to paths. This collapses all transformation into the node coordinates, and you would have the absolute values in the 'd' attribute.

Ok... I'll see if this gets me somewhere. Will the individual hexagons keep there current ID#s? could you expand on this alittle?
Can't you just use the transform information and apply that to key labels?

Probably not without rewriting the interpreter in the keyboard code.
~aka.bugle

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: Hexagon grid without clone for on screen keyboard layout

Postby RobA » Thu Jan 24, 2008 5:41 am

I just tried it and see that ID's are preserved when converted to paths.

You can quickly see all this by using the XML editor (Edit->XML Editor)

-Rob A>


Return to “Help with using Inkscape”