Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (672)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  SVG world map  (Read 4130 times)
0 Members and 1 Guest are viewing this topic.
Online CommanderKeith
« Posted 2010-12-09 05:38:27 »


I found this cool <a href="">vector world map</a> as an adobe illustrator file (.ai) which i was able to open with the free vector program Inkscape and save as an SVG file  Cool

I can see the coordinates of the path which is the outline of the world's continents in the SVG file.

Any ideas on how to turn the SVG string into a bunch of simple polygons composed of straight lines?

I'm currently reading the SVG specs to try and parse the file myself and make a <a href="">Path2D</a> but I wanted to ask you guys if there was a smarter way.

Unfortunately there are some cubic curves instead of just points and lines. So what I wanted to do was make a Path2D out of the string automagically, then use the Path2D.getPathIterator(double flatness) method to turn the curves to ordinary lines. Batik is meant to do this stuff, but there's no clear method that just sucks in an SVG file and pumps out a Path2D  Undecided


Offline Nate

« JGO Bitwise Duke »

Medals: 166
Projects: 4
Exp: 14 years

Esoteric Software

« Reply #1 - Posted 2010-12-09 06:02:24 »

I think Slick has something for this, or maybe used some other library to do something with SVG at some point.

Online CommanderKeith
« Reply #2 - Posted 2010-12-09 08:09:36 »

Thanks, I'll take a look  Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zammbi

JGO Coder

Medals: 4

« Reply #3 - Posted 2010-12-09 10:29:30 »

On the Substance blog:
I remember reading about an app which converted SVG to Java2D classes. Substance demos use these converted classes.

Current project - Rename and Sort
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (45 views)
2016-04-18 14:18:53

KaiHH (45 views)
2016-04-18 08:35:41

KaiHH (75 views)
2016-04-15 12:43:58

theagentd (78 views)
2016-04-14 02:16:17

theagentd (90 views)
2016-04-14 02:15:43

IanParcs (104 views)
2016-04-12 03:51:16

IanParcs (47 views)
2016-04-12 03:50:03

IanParcs (43 views)
2016-04-12 03:49:54

IanParcs (38 views)
2016-04-12 03:49:52

IanParcs (48 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!