Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 4913 times)
0 Members and 1 Guest are viewing this topic.
Offline 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: 167
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.

Offline 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  

EgonOlsen (45 views)
2018-06-10 19:43:48

EgonOlsen (27 views)
2018-06-10 19:43:44

EgonOlsen (47 views)
2018-06-10 19:43:20

DesertCoockie (210 views)
2018-05-13 18:23:11

nelsongames (127 views)
2018-04-24 18:15:36

nelsongames (126 views)
2018-04-24 18:14:32

ivj94 (867 views)
2018-03-24 14:47:39

ivj94 (128 views)
2018-03-24 14:46:31

ivj94 (779 views)
2018-03-24 14:43:53

Solater (143 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!