Re: Represent roads




"Si" <si@xxxxxxxxxxxxxxx> wrote in message
news:%0LGf.38854$Rw6.35097@xxxxxxxxxxxxxxxxxxxxxxx
I have program that uses the java.awt.Graphics toolkit to display a
streetmap using a set of lines joining up co-ordinates (using
g.drawLine(x1,y1,x2,y2)).

What is the best approach for making these lines look more like roads e.g.
at the very least with color and about 5 pixels thick... a one pixel dark
border around the lines would be nice too.

Any suggestions?

If you want a border, you'll probably have to switch your code to draw
the roads as polygons instead of as lines. You can fake it by drawing a 6-7
pixel thick line, and then drawing a 5 pixel thick line ontop of it, so that
the thicker line in the background "looks like" borders around the thinner
line, but it sounds like you're not far off from actually taking the width
of the roads into account in future versions for more realistic or accurate
renderings of the map.

- Oliver


.



Relevant Pages

  • Re: State line sign locations (was Re: Document misprints vs sign errors)
    ... In my experience here in Massachusetts, state surface roads have the ... municipal town crossing sign pretty close to the actual border. ...
    (misc.transport.road)
  • Re: driving France->Switzerland->Italy
    ... < I've been reading about driving through France to Switzerland ... < at the Czech border and have passports and visas checked. ... Switzerland is not member of the EU (means not toll ... Old constitution did not allow toll roads, ...
    (rec.travel.europe)
  • Re: driving France->Switzerland->Italy
    ... at the Czech border and have passports and visas checked. ... Switzerland is not member of the EU (means not toll ... especially) if not on major highway entrances. ... using regular more scenic roads might ...
    (rec.travel.europe)
  • Re: trip to el paso (and phoenix) (long)
    ... Ranch roads are most common in the Hill Country region. ... a designation of 478, but I didn't see anything to suggest it was ... Deming.have shields with the shape of New Mexico insted of the zia. ... describes how the border shift came about over the course of about 100 ...
    (misc.transport.road)
  • Re: M1 trucker!
    ... old roads. ... I've been driving that route since about 1990. ... entering France at Ventimilliga, shot just before the new border ... border quite a lot it was total mayhem. ...
    (uk.rec.driving)