I'm trying to create a hex-tile for use in multiple future maps - each side is supposed to measure 24px
Thus far, I have drawn the singleton tile but I don't understand the output I'm getting in Inkscape
src file for reference: http://kstingel.com/svg/debugging/hex-single.svg
this is the result I see in Inkscape:
(image can be viewed full-size @ http://kstingel.com/svg/debugging/inkscape_hex-single_original-size.jpg)
if you check the src file, you will see I have stroke-alignment="inner" in the path attributes,
but Inkscape seems to be ignoring that and still drawing the stroke along the path center
since this will impact the "tiles" I create, I would prefer to get this sorted before I progress with creating my maps
Creating a Hex Tile
Creating a Hex Tile
Last edited by kstingel on Mon Mar 28, 2016 2:15 am, edited 1 time in total.
Re: Creating a Hex Tile
The display lines from the src file:
Code: Select all
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
<path id="hex-24px" stroke-alignment="inner" d="M 18,0 L 24,10.395 L 18,20.79 L 6,20.79 L 0,10.395 L 6,0 Z" style="opacity:1;fill:none;stroke:#2f4f4f;stroke-width:0.3;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:0.75" inkscape:connector-curvature="0" />
</g>
Re: Creating a Hex Tile
the Hex above will be the base tile for my map, with additional tiles depicting the variants
would I be best served to use individual SVG images for my tiles, or create all the tiles in a single file?
Person tile example: (only the central tile will display the face ... displayed tile is the Owner of the displayed Map, neighbors would just show the person)
... src: http://kstingel.com/svg/debugging/hex-person.svg
would I be best served to use individual SVG images for my tiles, or create all the tiles in a single file?
Person tile example: (only the central tile will display the face ... displayed tile is the Owner of the displayed Map, neighbors would just show the person)
... src: http://kstingel.com/svg/debugging/hex-person.svg
-
- Posts: 28
- Joined: Sat Feb 27, 2016 2:55 am
Re: Creating a Hex Tile
I don't think the stroke-alignment attribute is supported yet.
Its not too hard to work around though. You can double the stroke width for one. For example, if you want to have a border with an inset of 5px set the stroke to 10px. Enable cusp snapping to arrange your hex-grids and you're good to go.
Its not too hard to work around though. You can double the stroke width for one. For example, if you want to have a border with an inset of 5px set the stroke to 10px. Enable cusp snapping to arrange your hex-grids and you're good to go.
Last edited by dimumurray on Mon Mar 28, 2016 1:49 pm, edited 4 times in total.
-
- Posts: 28
- Joined: Sat Feb 27, 2016 2:55 am
Re: Creating a Hex Tile
kstingel wrote:would I be best served to use individual SVG images for my tiles, or create all the tiles in a single file?
You can create your tiles and convert them to symbols and keep them in one svg file and use that svg as a symbol library.
Re: Creating a Hex Tile
@dimumurray: within my Symbols file, would I place each Symbol (template) in the same position?
so, for example, if my final tile is going to be 20.79px deep by 24px wide (the measurement of my hex)
draw each symbol into the same space then to create my examples, just "use" the symbol to the desired x/y co-ords?
As you can probably guess, I'm still learning the concepts of symbols, patterns and tiles and working out when to use which type
an example of the symbols I've created so far - I wasn't sure if they should be symbols / patterns or tiles
so, for example, if my final tile is going to be 20.79px deep by 24px wide (the measurement of my hex)
draw each symbol into the same space then to create my examples, just "use" the symbol to the desired x/y co-ords?
As you can probably guess, I'm still learning the concepts of symbols, patterns and tiles and working out when to use which type
an example of the symbols I've created so far - I wasn't sure if they should be symbols / patterns or tiles
Re: Creating a Hex Tile
Hello
I agree with dimumurray.That propriety is still not supported. If I remember well, it's just a proposal for next upgrade of the SVG standard... or something like that .
But If some one can show a link or document that probes I'm wrong... I will be grateful.
Code: Select all
stroke-alignment="inner"
I agree with dimumurray.That propriety is still not supported. If I remember well, it's just a proposal for next upgrade of the SVG standard... or something like that .
But If some one can show a link or document that probes I'm wrong... I will be grateful.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: Creating a Hex Tile
the example above had a whole heap of transforms applied to each use instance, with the use co-ords set as x="0" and y="0"
- I ended up hacking it in Notepad++ and moving the transforms over to the co-ords values then deleting the (empty) transform
- I ended up hacking it in Notepad++ and moving the transforms over to the co-ords values then deleting the (empty) transform
Re: Creating a Hex Tile
thanks hulf2012 and dimumurray for clearing up the stroke-alignment thing - I was convinced I was using it wrong and that was why it wasn't working
as an Inkscape noobie, is nice to know my comprehension of SVG is more advanced than the software (in some respects)
as an Inkscape noobie, is nice to know my comprehension of SVG is more advanced than the software (in some respects)
Re: Creating a Hex Tile
Sometimes, the posts in the forum helps in both ways.
About the use of a symbol object... I think it will depend of your needs. Here I have to say that I'm not clear about its utility for your proposal. Perhaps It will reduce the amount of code...
A source that I always consult:
http://tutorials.jenkov.com/svg/symbol-element.html
About the use of a symbol object... I think it will depend of your needs. Here I have to say that I'm not clear about its utility for your proposal. Perhaps It will reduce the amount of code...
A source that I always consult:
http://tutorials.jenkov.com/svg/symbol-element.html
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Creating a Hex Tile
If you double the stroke, but don't want the stroke to extend beyond the path, you can clip the shape with a duplicate of itself.
- Attachments
-
- NotAndClipped-2pxStroke.svg
- (3.83 KiB) Downloaded 170 times
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Creating a Hex Tile
example use of the tile-set - src file: http://kstingel.com/svg/debugging/hex-world.svg
I suppose I should stop referring to it as a tile-set, since it's now a symbol set
eventually, I'd like to script it so that I can set the status of neighbors and change the "person" overlay accordingly,
but for now I'm just happy to have to building blocks in place
the world view expands in rings depending on the direction explored - I can probably achieve that with masks or clips,
but at this stage my knowledge doesn't extend that far ... that's next week's chapter