27th Oct 2016 SVG graphics and .NET 4.6

Discussions about the preview versions of Virtual Radar Server.
Forum rules
Please bear in mind if you do install a preview version that it is unfinished code, there may be bugs, bits missing, things that don't work etc.

Posts in this forum will not show up in forum search results. Old threads will be pruned occasionally.
agw
Posts: 1870
Joined: Fri Feb 17, 2012 3:20 am

Re: 27th Oct 2016 SVG graphics and .NET 4.6

Postby agw » Wed Dec 07, 2016 12:18 am

If you send me an email with the SVG file attached (just one), along with the aircraft marker settings for the custom logo that you're using, then I'll take a look and post what you need to do.

egpd1701
Posts: 43
Joined: Fri Nov 08, 2013 3:39 pm

Re: 27th Oct 2016 SVG graphics and .NET 4.6

Postby egpd1701 » Tue Dec 27, 2016 8:48 am

Hi Andrew

I've got the new svg'd working fine thanks but there is a problem I cant figure out.

They don't rotate about the center of the graphic. The viewbox size has to be larger than the actual svg (mines are built on a 128x128) and there are translates which I've not idea what they are for and seem to do nothing (well, the one at the end of the svg anyway).

I cant get the altitude stalk to match the center of the object (the object is at the center of the svg) the translate for that works but look hideously wrong when the a/c turns.

Any ideas please?

egpd1701
Posts: 43
Joined: Fri Nov 08, 2013 3:39 pm

Re: 27th Oct 2016 SVG graphics and .NET 4.6

Postby egpd1701 » Tue Dec 27, 2016 8:51 am

Here is a picture of what I mean

Which wont let me attach a jpg (it still says HTTP error) - so no picture

agw
Posts: 1870
Joined: Fri Feb 17, 2012 3:20 am

Re: 27th Oct 2016 SVG graphics and .NET 4.6

Postby agw » Sat Dec 31, 2016 2:10 am

I make the assumption that the viewbox on the SVG that you supply is 0 0 W H, where W and H are the pixel width and height of the image, and that the pixel width and height of the SVG are the same as those declared in the aircraft marker settings. For example, this is an excerpt of the aircraft marker settings for a medium WTC 4 jet:

Code: Select all

        new VRS.AircraftMarker({
            normalFileName:     'WTC-Medium-4-Jet.png',
            selectedFileName:   'WTC-Medium-4-Jet-Selected.png',
            embeddedSvg:        VRS.EmbeddedSvgs.Marker_Medium4Jet,
            size:               { width: 40, height: 40 }
            ...


and this is the declaration of the size and viewbox for the SVG tag in VRS.EmbeddedSvgs.Marker_Medium4Jet:

Code: Select all

<svg
   ...
   width="40"
   height="40"
   viewBox="0 0 40 40"
   ...


My guess is that your SVG is 128x128 but the aircraft marker is declaring another size? If so then you just need to scale the SVG down to the same dimensions that are declared in the AircraftMarker settings and use that.

If that's not the case then send the SVG to me and I'll take a look.


Return to “Preview Versions”

Who is online

Users browsing this forum: No registered users and 1 guest