How can i stop grid lines appearing every time i use stroke in QGIS when exporting to SVG - svg

I am a bit new to QGIS but having a play around with it. At the moment I am trying to export an SVG (vector) so that I can keep all the layers I have created, but every time I use a stroke on anything, like the buildings or sea, i get a grid included that cuts into the shapes (see examples attached). It doesn't seem to do this when exporting to a PDF. The PDF doesn't preserve the layers so my question is, when using a stroke, is there a way of removing the grid like shape, when exporting an SVG from QGIS?
I have tried lots of things, like, splitting up all the part of the map onto separate layers, which helped make the grid less noticeable but didn't eliminate the problem.

Related

Exporting Illustrator to SVG, Colours, Gradients and Opacity wrongly displayed

I'm having trouble creating an SVG (for web use) from an illustrator file sent by the design agency. The SVG exported doesn't look like the same, specially because the affected areas are suppose to look like shadowed areas of human characters. The art created is quite complex and I'm not authorised to show it, but I'm just putting here one of the elements that replicates the issue.
original .ai file + exported .svg in this zip: http://we.tl/AdJPqFqQd1
I've also saved it in .eps and tried exporting, but it didn't make a difference
I'm looking for a solution that wouldn't be too hurtful considering that there are many elements in the original artwork like this shape and most of them have different colours and shapes.
I tried to access the CSS within the SVG but I couldn't manage to change the gradient.
Using Illustrator CC 2015 I've tried exporting with all the different options (unless I missed some special combination, which I do not believe)
Hopefully and with a lot of luck, I would like to find someone who came across this problem before and knows how to deal with it. If you could try it yourself, you would be aware of this issue and I would appreciate it very much. Thanks

How to code svg layers so they appear in Inkscape layers drop down menu?

I'am coding some svg for later Inkscape post-editing. Also, I have groups that I want to make appears as layer when in the drop down menu. But currently, when clicked, I just see (root) and nothing more while I actually have 12 layers which should produce 12 rows pilling up.
I currently do :
svg.append("g")
.attr("groupmode","layer")
.attr({'id':'L1_borders','label':'L1_borders'})
But it doesn't work (see & download).
How to code svg layers so they appear in Inkscape layers drop down menu ?
Open Inkscape GUI, create a new layer, and inspecting it shows that, for some reasons, Inkscape adds the namespace "inkscape:" before few attibute's keys, such:
So the D3 code mirroring this behavior should rather be:
svg.append("g")
.attr("inkscape:groupmode","layer")
.attr({'id':'L1_borders','inkscape:label':'L1_borders'})
which annoys me because it's unlikely to be standard. Annoying.
Even that addition, actually, get cleaned up by D3js which I totally support in this audacious move !
Yet, i need these. I eventually made a tiny hack :
svg.append("g")
.attr(":inkscape:groupmode","layer")
.attr({'id':'L1_borders',':inkscape:label':'L1_borders'})
D3js cleans up the first ...: and leaves the inkscape:label. It then works. By ex. When done on L0 & L1:
Layers are now accessible as clickable rows in the drop GUI layers down menu.
Oh, ugly naughty non-standard hack~~~

Combining shapes in SVG before applying a filter to resultant shape

I'm currently in the process of drawing a logo in SVG.
The logo drawing is perfectly fine, however I want to apply a filter to my shapes. Now the letters in the logotype are made up of separate shapes.
My question is how do I best combine said shapes into one resultant shape? I've found some things about feBlend and veUnion but information is scattered and sparse and these are my first steps into the wonderful world of SVG.
Besides unioning two shapes into one before applying my filter I'd also want (in the case of my example the n in the word qabana) to subtract certain shapes from a shape before applying my filter.
Example of the SVG I am working on: http://buffer.io/~simon/qabana-svg/handmade-stackoverflow.svg (this should immediately show you the issues I'm having).
Also, any bonus tips on how to improve my SVG in that file are gladly heard.
veUnion isn't implemented in any browser at this point in time. If you want to merge two or more shapes to a single path you can use a vector graphics editor (e.g Inkscape or Illustrator). If you want to group elements, use a <g> element, and apply the filter to that instead.

Why is duplicate text being rendered onto the Z buffer of a different texture when using D3DXFont::DrawText?

I've been stumbling over this for a while and was wondering if anyone has run into this problem before.
The application I'm working on is divided into multiple data plots and a single timeline at the bottom of the screen. Each plot (which is actually multiple textures layered on top of each other) as well as the timeline is rendered to a separate texture. The timeline texture is rendered first, followed by each of the plot textures from the top of the screen to the bottom. I am using DXUT and DirectX9 (March 2009).
After adding time text to the timeline texture, I noticed that the text was repeated in the title bar of every data plot. Here's a screencap of a portion of the display, it shows just a single plot, but the text repeats on every plot opened:
It seems like it is tied directly to the DrawText being called in the timeline's render function. I do use relative coordinates as the rect being passed to DrawText, but since I've already set the render target to the desired texture it should only affect the current texture. Not every texture rendered afterward.
Has anyone ever run into any problems similar to this using D3DXFont?
EDIT: After some more experimentation, it looks like it has something to do with the Z buffer. By adding D3DCLEAR_ZBUFFER to the clear on each texture surface, the duplicate text is gone. While the problem seems bypassed for now, I'm still curious as to why the Z buffer for a completely separate texture was being written during my DrawText call.
The Z Buffer state is persistent.
For example,
SetDepthStencilSurface(X)
SetRenderTarget(A)
Draw()
SetRenderTarget(B)
Draw()
Both Draw calls will use the same depth buffer.
The DrawText is not changing the depth buffer that you have set. It assumes you meant to do what you did.

How to place the same path multiple times at different sizes/coordinates?

I have a path I've created in Illustrator and saved as an SVG.
Now I want to programmatically place it at different sizes and coordinates on a large canvas.
Say I've got this image:
(source: omgtldr.com)
How would I reproduce that same image in different places and sizes in one SVG file, like this:
(source: omgtldr.com)
for example, one version shrunk by 20% at coordinates x,y; another enlarged by 30% at coordinates a,b and so on.
Please assume I'm going to be OK with the programming part, I'm comfortable working with XML files. It's the SVG parts I don't understand.
You need the transform attribute. You can move your paths with translate and resize them with scale.
Better to use the <use> element (transformed) than to copy your path for each instance.

Resources