Re: Represent roads
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Thu, 09 Feb 2006 17:42:06 GMT
"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
.
- References:
- Represent roads
- From: Si
- Represent roads
- Prev by Date: Represent roads
- Next by Date: JTextPane: find the length of invisible text ?
- Previous by thread: Represent roads
- Next by thread: Re: Represent roads
- Index(es):
Relevant Pages
|